From 23dc16559298303386149bc78cc7f687bc7fb4bf Mon Sep 17 00:00:00 2001 From: somiaj Date: Wed, 30 Jun 2021 09:08:26 -0600 Subject: [PATCH] Fix pass through binding logic. Ensure that '--' gets processed correctly in defining a window specific binding (it was being ignored and treated as an unbind action). --- fvwm/bindings.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/fvwm/bindings.c b/fvwm/bindings.c index 01e8e10d9..b71a74b00 100644 --- a/fvwm/bindings.c +++ b/fvwm/bindings.c @@ -392,6 +392,8 @@ static int ParseBinding( if (action != NULL) { action = SkipSpaces(action, NULL, 0); + if (action != NULL) + is_pass_through = is_pass_through_action(action); } if ( action == NULL || *action == 0 || @@ -399,27 +401,23 @@ static int ParseBinding( { is_unbind_request = True; } - else + else if (is_pass_through) { - is_pass_through = is_pass_through_action(action); - if (is_pass_through) + /* pass-through actions indicate that the event be + * allowed to pass through to the underlying window. */ + if (window_name == NULL) { - /* pass-through actions indicate that the event be - * allowed to pass through to the underlying window. */ - if (window_name == NULL) + /* It doesn't make sense to have a pass-through + * action on global bindings. */ + if (!is_silent) { - /* It doesn't make sense to have a pass-through - * action on global bindings. */ - if (!is_silent) - { - fvwm_debug( - __func__, - "Invalid action for global " - "binding: %s", tline); - } - - return 0; + fvwm_debug( + __func__, + "Invalid action for global " + "binding: %s", tline); } + + return 0; } }