current_wm_sn_owner = None;
}
- {
- /* Generate a timestamp */
- XEvent event;
-
- XSelectInput(ob_display, screen_support_win, PropertyChangeMask);
-
- XChangeProperty(ob_display, screen_support_win,
- prop_atoms.wm_class, prop_atoms.string,
- 8, PropModeAppend, NULL, 0);
- XWindowEvent(ob_display, screen_support_win,
- PropertyChangeMask, &event);
-
- XSelectInput(ob_display, screen_support_win, NoEventMask);
-
- timestamp = event.xproperty.time;
- }
+ timestamp = event_get_server_time();
XSetSelectionOwner(ob_display, wm_sn_atom, screen_support_win,
timestamp);
/* create the netwm support window */
attrib.override_redirect = TRUE;
+ attrib.event_mask = PropertyChangeMask;
screen_support_win = XCreateWindow(ob_display,
RootWindow(ob_display, ob_screen),
-100, -100, 1, 1, 0,
CopyFromParent, InputOutput,
CopyFromParent,
- CWOverrideRedirect, &attrib);
+ CWEventMask | CWOverrideRedirect,
+ &attrib);
XMapWindow(ob_display, screen_support_win);
XLowerWindow(ob_display, screen_support_win);
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;
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 */
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;