From b0f43a115909a810bca9bbfa664851703bfd43e1 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 8 May 2007 22:29:39 +0000 Subject: don't focus splash screens and toolbars and menus when you click on them. or enter them. --- openbox/client.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'openbox/client.c') 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? */ -- cgit v1.2.3