From: Dana Jansens Date: Sun, 19 Sep 2010 15:06:49 +0000 (-0400) Subject: less redundant calls to screen_update_areas() and client_move_onscreen() X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fopenbox;a=commitdiff_plain;h=d3660704f1195fb724f5c0c027bdd084824c511f less redundant calls to screen_update_areas() and client_move_onscreen() --- diff --git a/openbox/dock.c b/openbox/dock.c index 00abc530..c26eee62 100644 --- a/openbox/dock.c +++ b/openbox/dock.c @@ -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(); } diff --git a/openbox/screen.c b/openbox/screen.c index 4d73eeac..a94347ed 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -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); }