mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-10 05:33:51 -04:00
config, input: allow configuring select-override modifiers
This commit is contained in:
parent
281127cae1
commit
a4d53bdf88
6 changed files with 100 additions and 19 deletions
11
terminal.c
11
terminal.c
|
|
@ -2826,10 +2826,15 @@ term_mouse_grabbed(const struct terminal *term, struct seat *seat)
|
|||
/*
|
||||
* Mouse is grabbed by us, regardless of whether mouse tracking has been enabled or not.
|
||||
*/
|
||||
|
||||
xkb_mod_mask_t mods;
|
||||
get_current_modifiers(seat, &mods, NULL, 0);
|
||||
|
||||
const xkb_mod_mask_t override_modmask = seat->kbd.selection_override_modmask;
|
||||
bool override_mods_pressed = (mods & override_modmask) == override_modmask;
|
||||
|
||||
return term->mouse_tracking == MOUSE_NONE ||
|
||||
(seat->kbd_focus == term &&
|
||||
seat->kbd.shift &&
|
||||
!seat->kbd.alt && /*!seat->kbd.ctrl &&*/ !seat->kbd.super);
|
||||
(seat->kbd_focus == term && override_mods_pressed);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue