X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=8bab662f10b9e57ce7cbe97b12425f4371e48f50;hb=074bd96696084ced565c4d1b67884a6381cc8d0e;hp=6f51bc1b24ab45a34f7fe865b931b642cfa82c39;hpb=77baf26a7f2f64ddf1274035fd4991ab17345904;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index 6f51bc1b..8bab662f 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -282,8 +282,10 @@ gboolean screen_annex() supported[i++] = prop_atoms.net_wm_state_demands_attention; supported[i++] = prop_atoms.net_moveresize_window; supported[i++] = prop_atoms.net_wm_moveresize; +/* supported[i++] = prop_atoms.net_wm_user_time; supported[i++] = prop_atoms.net_wm_user_time_window; +*/ supported[i++] = prop_atoms.net_frame_extents; supported[i++] = prop_atoms.net_request_frame_extents; supported[i++] = prop_atoms.net_restack_window; @@ -641,8 +643,14 @@ void screen_add_desktop(gboolean current) for (it = client_list; it; it = g_list_next(it)) { ObClient *c = it->data; - if (c->desktop != DESKTOP_ALL && c->desktop >= screen_desktop) + if (c->desktop != DESKTOP_ALL && c->desktop >= screen_desktop && + /* don't move direct children, they'll be moved with their + parent - which will have to be on the same desktop */ + !client_direct_parent(c)) + { + ob_debug("moving window %s\n", c->title); client_set_desktop(c, c->desktop+1, FALSE, TRUE); + } } } } @@ -670,9 +678,13 @@ void screen_remove_desktop(gboolean current) if (WINDOW_IS_CLIENT(it->data)) { ObClient *c = it->data; guint d = c->desktop; - if (d != DESKTOP_ALL && d >= movedesktop) { - client_set_desktop(c, c->desktop - 1, TRUE, TRUE); + if (d != DESKTOP_ALL && d >= movedesktop && + /* don't move direct children, they'll be moved with their + parent - which will have to be on the same desktop */ + !client_direct_parent(c)) + { ob_debug("moving window %s\n", c->title); + client_set_desktop(c, c->desktop - 1, TRUE, TRUE); } /* raise all the windows that are on the current desktop which is being merged */ @@ -1545,7 +1557,9 @@ Rect* screen_physical_area_active() Rect *a; gint x, y; - if (focus_client) + if (moveresize_client) + a = screen_physical_area_monitor(client_monitor(focus_client)); + else if (focus_client) a = screen_physical_area_monitor(client_monitor(focus_client)); else { Rect mon;