]> Dogcows Code - chaz/openbox/commitdiff
less redundant calls to screen_update_areas() and client_move_onscreen()
authorDana Jansens <danakj@orodu.net>
Sun, 19 Sep 2010 15:06:49 +0000 (11:06 -0400)
committerDana Jansens <danakj@orodu.net>
Mon, 24 Jan 2011 19:19:22 +0000 (14:19 -0500)
openbox/dock.c
openbox/screen.c

index 00abc53057348270da7e6db95e6ac885e3953480..c26eee6291457adefc0394c930213ca96ab7ae52 100644 (file)
@@ -551,6 +551,8 @@ void dock_configure(void)
         dock->area.height += ob_rr_theme->obwidth * 2;
     }
 
+    /* screen_resize() depends on this function to call screen_update_areas(),
+       so if this changes, also update screen_resize(). */
     screen_update_areas();
 }
 
index 4d73eeac4de70a32eb1f57c0e6d39036ce83f725..a94347edf0f025b8c09267ecb78b50b0371307c0 100644 (file)
@@ -500,11 +500,12 @@ void screen_resize(void)
     if (ob_state() != OB_STATE_RUNNING)
         return;
 
-    screen_update_areas();
+    /* this calls screen_update_areas(), which we need ! */
     dock_configure();
 
-    for (it = client_list; it; it = g_list_next(it))
-        client_move_onscreen(it->data, FALSE);
+    if (oldw)
+        for (it = client_list; it; it = g_list_next(it))
+            client_move_onscreen(it->data, FALSE);
 }
 
 void screen_set_num_desktops(guint num)
@@ -1458,10 +1459,8 @@ void screen_update_areas(void)
                     dims, 4 * screen_num_desktops);
 
     /* the area has changed, adjust all the windows if they need it */
-    for (it = onscreen; it; it = g_list_next(it)) {
-        client_move_onscreen(it->data, FALSE);
+    for (it = onscreen; it; it = g_list_next(it))
         client_reconfigure(it->data, FALSE);
-    }
 
     g_free(dims);
 }
This page took 0.028584 seconds and 4 git commands to generate.