From 15c59f991943cfe2cf0bed62de7a3ae62e9a8e0b Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 20 Mar 2014 10:24:43 -0400 Subject: [PATCH] keybindings: Split out check for filter_keybinding This is a small code cleanup for clarity. --- src/core/keybindings.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/keybindings.c b/src/core/keybindings.c index c47178773..a574f6c5a 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -1680,8 +1680,13 @@ process_event (MetaDisplay *display, event->hardware_keycode, event->modifier_state); if (!binding || - (!window && binding->flags & META_KEY_BINDING_PER_WINDOW) || - meta_compositor_filter_keybinding (display->compositor, screen, binding)) + (!window && binding->flags & META_KEY_BINDING_PER_WINDOW)) + goto not_found; + + /* If the compositor filtered out the keybindings, that + * means they don't want the binding to trigger, so we do + * the same thing as if the binding didn't exist. */ + if (meta_compositor_filter_keybinding (display->compositor, screen, binding)) goto not_found; if (binding->handler == NULL)