diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/events.c | 14 | ||||
-rw-r--r-- | src/manage.c | 23 |
2 files changed, 3 insertions, 34 deletions
diff --git a/src/events.c b/src/events.c index ded7698..766c708 100644 --- a/src/events.c +++ b/src/events.c @@ -687,13 +687,7 @@ focus_change (XFocusChangeEvent *ev) static void mapping_notify (XMappingEvent *ev) { - rp_window *cur; - - /* Remove the grab on the current prefix key */ - list_for_each_entry (cur,&rp_mapped_window,node) - { - ungrab_top_level_keys (cur->w); - } + ungrab_keys_all_wins(); switch (ev->request) { @@ -705,11 +699,7 @@ mapping_notify (XMappingEvent *ev) break; } - /* Add the grab on the current prefix key */ - list_for_each_entry (cur, &rp_mapped_window,node) - { - grab_top_level_keys (cur->w); - } + grab_keys_all_wins(); } /* This is called whan an application has requested the diff --git a/src/manage.c b/src/manage.c index 5955137..7a3898f 100644 --- a/src/manage.c +++ b/src/manage.c @@ -131,28 +131,7 @@ grab_top_level_keys (Window w) void ungrab_top_level_keys (Window w) { - KeySym keysym, upper, lower; - rp_keymap *map; - int i; - - map = find_keymap (TOP_KEYMAP); - - if (map == NULL) - { - PRINT_ERROR (("Unable to find " TOP_KEYMAP " keymap\n")); - return; - } - - /* Make sure we ungrab the right sym. */ - - for (i=0; i<map->actions_last; i++) - { - PRINT_DEBUG(("%d\n", i)); - keysym = map->actions[i].key; - XConvertCase (keysym, &lower, &upper); - keysym = lower; - XUngrabKey(dpy, XKeysymToKeycode (dpy, keysym), AnyModifier, w); - } + XUngrabKey(dpy, AnyKey, AnyModifier, w); } void |