]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
don't focus splash screens and toolbars and menus when you click on them. or enter...
[chaz/openbox] / openbox / client.c
index e2b2636baa52101935b2ec8a105df60322f8169b..21a0accf84db861698bb46476a609ce3bc2881a9 100644 (file)
@@ -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? */
This page took 0.022217 seconds and 4 git commands to generate.