stacking_raise(CLIENT_AS_WINDOW(c));
}
}
-
+
/* change our struts/area to match (after moving windows) */
screen_update_areas();
guint old;
gulong ignore_start;
gboolean allow_omni;
-
+
g_assert(num < screen_num_desktops);
old = screen_desktop;
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);
+ }
}
}
}
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 */
if (PROP_GETA32(RootWindow(ob_display, ob_screen),
net_desktop_layout, cardinal, &data, &num)) {
if (num == 3 || num == 4) {
-
+
if (data[0] == prop_atoms.net_wm_orientation_vert)
l.orientation = OB_ORIENTATION_VERT;
else if (data[0] == prop_atoms.net_wm_orientation_horz)
void screen_show_desktop(gboolean show, ObClient *show_only)
{
GList *it;
-
+
if (show == screen_showing_desktop) return; /* no change */
screen_showing_desktop = show;
g_free(m);
}
-
+
return a;
}
#endif
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;