X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fscreen.c;h=4b91a6dd23f9812700adfe2152a55e4b968c34e1;hb=b9b0284e3e4651618039e9a25aa7056f9596cb01;hp=5246d341ed22462bdbf55e778ff6058ee4eacd29;hpb=55b84316bb699fa530efe78d75ae8e1d57c1b57f;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index 5246d341..4b91a6dd 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -1374,7 +1374,14 @@ void screen_update_areas(void) { guint i; gulong *dims; - GList *it; + GList *it, *onscreen; + + /* collect the clients that are on screen */ + onscreen = NULL; + for (it = client_list; it; it = g_list_next(it)) { + if (client_monitor(it->data) != screen_num_monitors) + onscreen = g_list_prepend(onscreen, it->data); + } g_free(monitor_area); get_xinerama_screens(&monitor_area, &screen_num_monitors); @@ -1448,8 +1455,10 @@ void screen_update_areas(void) dims, 4 * screen_num_desktops); /* the area has changed, adjust all the windows if they need it */ - for (it = client_list; it; it = g_list_next(it)) + for (it = onscreen; it; it = g_list_next(it)) { + client_move_onscreen(it->data, FALSE); client_reconfigure(it->data, FALSE); + } g_free(dims); }