if (curdesk && self->desktop != screen_desktop &&
self->desktop != DESKTOP_ALL)
- client_set_desktop(self, screen_desktop, FALSE);
+ client_set_desktop(self, screen_desktop, FALSE, FALSE);
/* this puts it after the current focused window */
focus_order_remove(self);
}
void client_set_desktop_recursive(ObClient *self,
- guint target, gboolean donthide)
+ guint target,
+ gboolean donthide,
+ gboolean focus_nonintrusive)
{
guint old;
GSList *it;
g_assert(target < screen_num_desktops || target == DESKTOP_ALL);
/* remove from the old desktop(s) */
- focus_order_remove(self);
+ if (!focus_nonintrusive)
+ focus_order_remove(self);
old = self->desktop;
self->desktop = target;
screen_update_areas();
/* add to the new desktop(s) */
- if (config_focus_new)
- focus_order_to_top(self);
- else
- focus_order_to_bottom(self);
+ if (!focus_nonintrusive) {
+ if (config_focus_new)
+ focus_order_to_top(self);
+ else
+ focus_order_to_bottom(self);
+ }
/* call the notifies */
GSList *it;
for (it = self->transients; it; it = g_slist_next(it))
if (it->data != self)
if (client_is_direct_child(self, it->data))
- client_set_desktop_recursive(it->data, target, donthide);
+ client_set_desktop_recursive(it->data, target,
+ donthide, focus_nonintrusive);
}
-void client_set_desktop(ObClient *self, guint target, gboolean donthide)
+void client_set_desktop(ObClient *self, guint target,
+ gboolean donthide, gboolean focus_nonintrusive)
{
self = client_search_top_normal_parent(self);
- client_set_desktop_recursive(self, target, donthide);
+ client_set_desktop_recursive(self, target, donthide, focus_nonintrusive);
}
gboolean client_is_direct_child(ObClient *parent, ObClient *child)
self->desktop != screen_desktop)
{
if (here)
- client_set_desktop(self, screen_desktop, FALSE);
+ client_set_desktop(self, screen_desktop, FALSE, FALSE);
else
screen_set_desktop(self->desktop, FALSE);
} else if (!self->frame->visible)
}
}
+static void client_bring_non_application_windows_recursive(ObClient *self,
+ guint desktop)
+{
+ GSList *it;
+
+ for (it = self->transients; it; it = g_slist_next(it))
+ client_bring_non_application_windows_recursive(it->data, desktop);
+
+ if (client_normal(self) && !client_application(self) &&
+ self->desktop != desktop && self->desktop != DESKTOP_ALL)
+ {
+ client_set_desktop(self, desktop, FALSE, TRUE);
+ }
+}
+
+void client_bring_non_application_windows(ObClient *self)
+{
+ client_bring_non_application_windows_recursive(self, self->desktop);
+}
+
void client_raise(ObClient *self)
{
action_run_string("Raise", self, CurrentTime);