diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-08 22:29:39 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-08 22:29:39 +0000 |
| commit | b0f43a115909a810bca9bbfa664851703bfd43e1 (patch) | |
| tree | 72ee290d85e8a1f5230d788d03c4e8f4affa3dca /openbox/client.c | |
| parent | 97821223393cdebd3eb3fdfcc6d0dcf7502a62d7 (diff) | |
don't focus splash screens and toolbars and menus when you click on them. or enter them.
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/openbox/client.c b/openbox/client.c index e2b2636b..21a0accf 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? */ |
