X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=e0277edef18aba7299dd60680264bd5479cd21c3;hb=76ae19924d79326892f0b851db740d7207e4e158;hp=4d73eeac4de70a32eb1f57c0e6d39036ce83f725;hpb=5d5714f01e1a7140847f6e7f2922d457f6bbe66a;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index 4d73eeac..e0277ede 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); } @@ -1754,3 +1753,12 @@ gboolean screen_pointer_pos(gint *x, gint *y) } return ret; } + +gboolean screen_compare_desktops(guint a, guint b) +{ + if (a == DESKTOP_ALL) + a = screen_desktop; + if (b == DESKTOP_ALL) + b = screen_desktop; + return a == b; +}