]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/config/rcxml.c: Check for modifiers when merging mousebinds
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Fri, 18 Nov 2022 11:17:29 +0000 (12:17 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Fri, 18 Nov 2022 11:44:49 +0000 (12:44 +0100)
Previously mosuebinds for the same context using the same button
but different modifiers would be merged, e.g. only the last one
would survive the merge. This commit adds the missing check for
keyboard modifiers.

Fixes #630

Reported-by: @lidgnulinux
src/config/rcxml.c

index e5db0f6afaae807e9dac472c2d86fa13ae985c6f..0278bbb8585d89b8eee2e13c1fff4b34cd9aa33a 100644 (file)
@@ -658,7 +658,8 @@ merge_mouse_bindings(void)
                        if (existing->context == current->context
                                        && existing->button == current->button
                                        && existing->direction == current->direction
-                                       && existing->mouse_event == current->mouse_event) {
+                                       && existing->mouse_event == current->mouse_event
+                                       && existing->modifiers == current->modifiers) {
                                wl_list_remove(&existing->link);
                                action_list_free(&existing->actions);
                                free(existing);