]> Dogcows Code - chaz/openbox/commitdiff
make edge detection for maximized windows only look at the edges of screens
authorDana Jansens <danakj@orodu.net>
Fri, 15 Jan 2010 21:15:05 +0000 (16:15 -0500)
committerDana Jansens <danakj@orodu.net>
Fri, 15 Jan 2010 21:15:05 +0000 (16:15 -0500)
openbox/client.c

index 909112ea63e3bd0ed32c28ee9c95f47ebafa82a7..2f9cfb8f564c10127c5df34716885132a6bb8510 100644 (file)
@@ -4257,26 +4257,33 @@ void client_find_edge_directional(ObClient *self, ObDirection dir,
     }
 
     /* search for edges of clients */
-    for (it = client_list; it; it = g_list_next(it)) {
-        ObClient *cur = it->data;
+    if (((dir == OB_DIRECTION_NORTH || dir == OB_DIRECTION_SOUTH) &&
+         !self->max_vert) ||
+        ((dir == OB_DIRECTION_EAST || dir == OB_DIRECTION_WEST) &&
+         !self->max_horz))
+    {
+        for (it = client_list; it; it = g_list_next(it)) {
+            ObClient *cur = it->data;
 
-        /* skip windows to not bump into */
-        if (cur == self)
-            continue;
-        if (cur->iconic)
-            continue;
-        if (self->desktop != cur->desktop && cur->desktop != DESKTOP_ALL &&
-            cur->desktop != screen_desktop)
-            continue;
+            /* skip windows to not bump into */
+            if (cur == self)
+                continue;
+            if (cur->iconic)
+                continue;
+            if (self->desktop != cur->desktop && cur->desktop != DESKTOP_ALL &&
+                cur->desktop != screen_desktop)
+                continue;
 
-        ob_debug("trying window %s", cur->title);
+            ob_debug("trying window %s", cur->title);
 
-        detect_edge(cur->frame->area, dir, my_head, my_size, my_edge_start,
+            detect_edge(cur->frame->area, dir, my_head, my_size, my_edge_start,
+                        my_edge_size, dest, near_edge);
+        }
+        dock_get_area(&dock_area);
+        detect_edge(dock_area, dir, my_head, my_size, my_edge_start,
                     my_edge_size, dest, near_edge);
     }
-    dock_get_area(&dock_area);
-    detect_edge(dock_area, dir, my_head, my_size, my_edge_start,
-                my_edge_size, dest, near_edge);
+
     g_free(a);
 }
 
This page took 0.032338 seconds and 4 git commands to generate.