X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=d50388e775f624421bc502cb1fc1e3c1ea4b0c2a;hb=f0e5332b4ae5504f167d75e853c13e6f718ce70a;hp=e2b2636baa52101935b2ec8a105df60322f8169b;hpb=97821223393cdebd3eb3fdfcc6d0dcf7502a62d7;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index e2b2636b..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? */ @@ -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)