summaryrefslogtreecommitdiff
path: root/openbox/screen.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-04-27 17:24:51 -0400
committerDana Jansens <danakj@orodu.net>2010-04-28 12:58:46 -0400
commitb3023ac55b90d63cf8d5b21fb49a124f247f7e34 (patch)
treec8ad947a60931aa860a95791098b70b7fa1e0364 /openbox/screen.c
parent145d526df4bccec222f0f6f99b3fde56a1dad4c0 (diff)
make sure clients stay on screen when the root window changes size, and maximized/fullscreen windows must be on some monitor or it doesn't make much sense (and asserts)
Diffstat (limited to 'openbox/screen.c')
-rw-r--r--openbox/screen.c13
1 files changed, 11 insertions, 2 deletions
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);
}