self->type == OB_CLIENT_TYPE_SPLASH);
}
-gboolean client_application(ObClient *self)
+gboolean client_helper(ObClient *self)
{
- return (self->type == OB_CLIENT_TYPE_NORMAL ||
- self->type == OB_CLIENT_TYPE_DIALOG);
+ return (self->type == OB_CLIENT_TYPE_UTILITY ||
+ self->type == OB_CLIENT_TYPE_MENU ||
+ self->type == OB_CLIENT_TYPE_TOOLBAR);
}
static void client_apply_startup_state(ObClient *self, gint x, gint y)
}
}
-static void client_bring_non_application_windows_recursive(ObClient *self,
- guint desktop)
+static void client_bring_helper_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);
+ client_bring_helper_windows_recursive(it->data, desktop);
- if (client_normal(self) && !client_application(self) &&
+ if (client_helper(self) &&
self->desktop != desktop && self->desktop != DESKTOP_ALL)
{
client_set_desktop(self, desktop, FALSE, TRUE);
}
}
-void client_bring_non_application_windows(ObClient *self)
+void client_bring_helper_windows(ObClient *self)
{
- client_bring_non_application_windows_recursive(self, self->desktop);
+ client_bring_helper_windows_recursive(self, self->desktop);
}
void client_raise(ObClient *self)
return self->group && self->group->members->next;
}
-gboolean client_has_application_group_siblings(ObClient *self)
+gboolean client_has_non_helper_group_siblings(ObClient *self)
{
GSList *it;
for (it = self->group->members; it; it = g_slist_next(it)) {
ObClient *c = it->data;
- if (c != self && client_application(c))
+ if (c != self && client_normal(c) && !client_helper(c))
return TRUE;
}
return FALSE;
to them in a number of places regarding focus or user interaction. */
gboolean client_normal(ObClient *self);
-/*! Returns if the window is one of an application's main windows (normal or
- dialog type) rather than an accessory window (utilty, menu, etc) or a
- non-normal window */
-gboolean client_application(ObClient *self);
+/*! Returns if the window is one of an application's helper windows
+ (utilty, menu, etc) */
+gboolean client_helper(ObClient *self);
/* Returns if the window is focused */
gboolean client_focused(ObClient *self);
*/
void client_activate(ObClient *self, gboolean here, gboolean user);
-/*! Bring all of its non-application windows to its desktop. These are the
- utility and stuff windows. */
-void client_bring_non_application_windows(ObClient *client);
+/*! Bring all of its helper windows to its desktop. These are the utility and
+ stuff windows. */
+void client_bring_helper_windows(ObClient *client);
/*! Calculates the stacking layer for the client window */
void client_calc_layer(ObClient *self);
gboolean client_has_group_siblings(ObClient *self);
-gboolean client_has_application_group_siblings(ObClient *self);
+/*! Returns if a client has an group siblings which are main application
+ windows (not helper or non-normal windows) */
+gboolean client_has_non_helper_group_siblings(ObClient *self);
#endif
frame_adjust_focus(client->frame, TRUE);
focus_set_client(client);
client_calc_layer(client);
- client_bring_non_application_windows(client);
+ client_bring_helper_windows(client);
}
} else if (e->type == FocusOut) {
gboolean nomove = FALSE;
/* let alt-tab go to these windows when a window in its
group already has focus ... */
((focus_client && ft->group == focus_client->group) ||
- /* ... or if there are no application windows in its
- group */
- !client_has_application_group_siblings(ft))));
+ /* ... or if there are no main windows in its group */
+ !client_has_non_helper_group_siblings(ft))));
/* it's not set to skip the taskbar (unless it is a type that would be
expected to set this hint */
if (c->can_focus) {
/* do this here so that if you switch desktops to a window with
helper windows then the helper windows won't flash */
- client_bring_non_application_windows(c);
+ client_bring_helper_windows(c);
/* reduce flicker by hiliting now rather than waiting for the
server FocusIn event */
frame_adjust_focus(c->frame, TRUE);