diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/events.c | 14 | ||||
-rw-r--r-- | src/manage.c | 23 |
3 files changed, 9 insertions, 34 deletions
@@ -1,3 +1,9 @@ +2006-03-14 Shawn Betts <sabetts@vcn.bc.ca> + + * src/manage.c (ungrab_top_level_keys): unconditionally ungrab every key. + + * src/events.c (mapping_notify): call ungrab_keys_all_wins and grab_keys_all_wins. + 2006-04-10 Bernhard R. Link <brlink@debian.org> * src/manage.c (maximize_transient,maximize_normal): 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 |