]> Dogcows Code - chaz/openbox/commitdiff
only grab keybinds on the root window, not every client window
authorMikael Magnusson <mikachu@comhem.se>
Tue, 24 Apr 2007 21:45:43 +0000 (21:45 +0000)
committerMikael Magnusson <mikachu@comhem.se>
Tue, 24 Apr 2007 21:45:43 +0000 (21:45 +0000)
openbox/client.c
openbox/event.c
openbox/keyboard.c
openbox/keyboard.h

index 51e93c17c22de79a5985f76dad52e8a761e5e06f..ac500e319a2ae140cb34c57956d8e2e8b67f3821 100644 (file)
@@ -374,7 +374,6 @@ void client_manage(Window window)
              self->window, newx, newy, self->area.width, self->area.height);
     client_apply_startup_state(self, newx, newy);
 
-    keyboard_grab_for_client(self, TRUE);
     mouse_grab_for_client(self, TRUE);
 
     if (activate) {
@@ -490,7 +489,6 @@ void client_unmanage(ObClient *self)
         event_ignore_queued_enters();
     }
 
-    keyboard_grab_for_client(self, FALSE);
     mouse_grab_for_client(self, FALSE);
 
     /* remove the window from our save set */
index c3fab03e19819ecb56273a60bdf848e56bb9b7f4..788fd4bc1f128d5291bd148b079ac01009b00a89 100644 (file)
@@ -589,7 +589,7 @@ static void event_process(const XEvent *ec, gpointer data)
                     mouse_event(client, e);
                 } else if (e->type == KeyPress) {
                     keyboard_event((focus_cycle_target ? focus_cycle_target :
-                                    client), e);
+                                    (client ? client : focus_client)), e);
                 }
             }
         }
index 71164ac34d2aa122eb613e31a37b1d33d3f4ba79..6adb0aa9fa14f2cb3b0195fa914e81d4435333bc 100644 (file)
@@ -68,18 +68,12 @@ static void grab_for_window(Window win, gboolean grab)
     }
 }
 
-void keyboard_grab_for_client(ObClient *c, gboolean grab)
-{
-    grab_for_window(c->window, grab);
-}
-
 static void grab_keys(gboolean grab)
 {
     GList *it;
 
     grab_for_window(screen_support_win, grab);
-    for (it = client_list; it; it = g_list_next(it))
-        grab_for_window(((ObClient*)it->data)->window, grab);
+    grab_for_window(RootWindow(ob_display, ob_screen), grab);
 }
 
 static gboolean chain_timeout(gpointer data)
index 23b93684cc197e6745597b04ae8cf9a6f9ad1146..80709fa51d464bc9ee23c30d341618b6c5b706ab 100644 (file)
@@ -46,6 +46,4 @@ gboolean keyboard_process_interactive_grab(const XEvent *e,
                                            struct _ObClient **client);
 gboolean keyboard_interactively_grabbed();
 
-void keyboard_grab_for_client(struct _ObClient *c, gboolean grab);
-
 #endif
This page took 0.036608 seconds and 4 git commands to generate.