X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=d50388e775f624421bc502cb1fc1e3c1ea4b0c2a;hb=f0e5332b4ae5504f167d75e853c13e6f718ce70a;hp=e0d5c215a9afd6b00797b8dce3f15672fe827fb1;hpb=1e4215c5c63c53c199a3a5a177607de308c8a3f1;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index e0d5c215..d50388e7 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -2394,6 +2394,22 @@ gboolean client_helper(ObClient *self) self->type == OB_CLIENT_TYPE_TOOLBAR); } +gboolean client_mouse_focusable(ObClient *self) +{ + return !(self->type == OB_CLIENT_TYPE_MENU || + self->type == OB_CLIENT_TYPE_TOOLBAR || + self->type == OB_CLIENT_TYPE_SPLASH || + self->type == OB_CLIENT_TYPE_DOCK); +} + +gboolean client_enter_focusable(ObClient *self) +{ + /* you can focus desktops but it shouldn't on enter */ + return (client_mouse_focusable(self) && + self->type != OB_CLIENT_TYPE_DESKTOP); +} + + static void client_apply_startup_state(ObClient *self, gint x, gint y) { gboolean pos = FALSE; /* has the window's position been configured? */ @@ -2813,7 +2829,7 @@ static void client_iconify_recursive(ObClient *self, if (curdesk && self->desktop != screen_desktop && self->desktop != DESKTOP_ALL) - client_set_desktop(self, screen_desktop, FALSE, FALSE); + client_set_desktop(self, screen_desktop, FALSE); /* this puts it after the current focused window */ focus_order_remove(self); @@ -2841,9 +2857,11 @@ static void client_iconify_recursive(ObClient *self, void client_iconify(ObClient *self, gboolean iconic, gboolean curdesk) { - /* move up the transient chain as far as possible first */ - self = client_search_top_normal_parent(self); - client_iconify_recursive(self, iconic, curdesk); + if (self->functions & OB_CLIENT_FUNC_ICONIFY || !iconic) { + /* move up the transient chain as far as possible first */ + self = client_search_top_normal_parent(self); + client_iconify_recursive(self, iconic, curdesk); + } } void client_maximize(ObClient *self, gboolean max, gint dir) @@ -3031,15 +3049,14 @@ void client_set_desktop_recursive(ObClient *self, 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, focus_nonintrusive); + client_set_desktop_recursive(it->data, target, donthide); } void client_set_desktop(ObClient *self, guint target, gboolean donthide) { self = client_search_top_normal_parent(self); - client_set_desktop_recursive(self, target, donthide, focus_nonintrusive); + client_set_desktop_recursive(self, target, donthide); } gboolean client_is_direct_child(ObClient *parent, ObClient *child) @@ -3381,7 +3398,7 @@ static void client_present(ObClient *self, gboolean here, gboolean raise) self->desktop != screen_desktop) { if (here) - client_set_desktop(self, screen_desktop, FALSE, FALSE); + client_set_desktop(self, screen_desktop, FALSE); else screen_set_desktop(self->desktop, FALSE); } else if (!self->frame->visible) @@ -3448,7 +3465,6 @@ static void client_bring_helper_windows_recursive(ObClient *self, self->desktop != desktop && self->desktop != DESKTOP_ALL) { client_set_desktop(self, desktop, FALSE); ->>>>>>> .merge-right.r6182 } }