all repos — openbox @ fb2493115fd152e0f2247935eed1cbaca2f0ba6d

openbox fork - make it a bit more like ryudo

only grab keybinds on the root window, not every client window
Mikael Magnusson mikachu@comhem.se
commit

fb2493115fd152e0f2247935eed1cbaca2f0ba6d

parent

23a43c5a403785bd9b408da00bc89dc9c1f141d7

4 files changed, 2 insertions(+), 12 deletions(-)

jump to
M openbox/client.copenbox/client.c

@@ -374,7 +374,6 @@ ob_debug("placing window 0x%x at %d, %d with size %d x %d\n",

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 @@ */

event_ignore_queued_enters(); } - keyboard_grab_for_client(self, FALSE); mouse_grab_for_client(self, FALSE); /* remove the window from our save set */
M openbox/event.copenbox/event.c

@@ -589,7 +589,7 @@ e->type == MotionNotify) {

mouse_event(client, e); } else if (e->type == KeyPress) { keyboard_event((focus_cycle_target ? focus_cycle_target : - client), e); + (client ? client : focus_client)), e); } } }
M openbox/keyboard.copenbox/keyboard.c

@@ -68,18 +68,12 @@ win, GrabModeAsync);

} } -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)
M openbox/keyboard.hopenbox/keyboard.h

@@ -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