diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-12-04 17:27:03 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-12-04 17:27:03 +0000 |
| commit | ecfff42300c7fd904254562c3124dc4f61250601 (patch) | |
| tree | 5a6273077200137f9c008e4996885b81e9b8048b /input.c | |
| parent | install: add UTF-8 locate to runtime deps (diff) | |
| parent | improve documentation for [mouse-bindings].selection-override-modifiers (diff) | |
Merge branch 'configure-select-override-mods'
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -701,6 +701,11 @@ keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard, seat->kbd.key_arrow_down = xkb_keymap_key_by_name(seat->kbd.xkb_keymap, "DOWN"); } + /* Set selection-override modmask from configured mods and seat's mod indices */ + const struct config_key_modifiers* override_mods = + &wayl->conf->mouse.selection_override_modifiers; + seat->kbd.selection_override_modmask = conf_modifiers_to_mask(seat, override_mods); + munmap(map_str, size); close(fd); @@ -983,7 +988,7 @@ UNITTEST xassert(strcmp(info->seq, "\033[27;3;13~") == 0); } -static void +void get_current_modifiers(const struct seat *seat, xkb_mod_mask_t *effective, xkb_mod_mask_t *consumed, uint32_t key) @@ -2372,11 +2377,8 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, get_current_modifiers(seat, &mods, NULL, 0); mods &= seat->kbd.bind_significant; - /* Ignore Shift when matching modifiers, since it is - * used to enable selection in mouse grabbing client - * applications */ - if (seat->kbd.mod_shift != XKB_MOD_INVALID) - mods &= ~(1 << seat->kbd.mod_shift); + /* Ignore selection override modifiers when matching modifiers */ + mods &= ~seat->kbd.selection_override_modmask; const struct mouse_binding *match = NULL; |
