mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
input: regression: don’t pass on mouse click to application if we consumed it
When we ‘consume’ a mouse button event (i.e. when we have a shortcut
mapped to it), the event should *not* be passed on to the client
application.
In 5f64c5c335, button handling was
refactored and unfortunately introduced a regression where we once
again started passing consumed button presses to the client
application.
Fixes #168
This commit is contained in:
parent
2f20550893
commit
fdb7e40355
2 changed files with 18 additions and 7 deletions
16
input.c
16
input.c
|
|
@ -1589,13 +1589,15 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
|
|||
}
|
||||
}
|
||||
|
||||
if (!term_mouse_grabbed(term, seat) &&
|
||||
cursor_is_on_grid)
|
||||
{
|
||||
term_mouse_down(
|
||||
term, button, seat->mouse.row, seat->mouse.col,
|
||||
seat->kbd.shift, seat->kbd.alt, seat->kbd.ctrl);
|
||||
}
|
||||
}
|
||||
|
||||
if (!seat->mouse.consumed &&
|
||||
!term_mouse_grabbed(term, seat) &&
|
||||
cursor_is_on_grid)
|
||||
{
|
||||
term_mouse_down(
|
||||
term, button, seat->mouse.row, seat->mouse.col,
|
||||
seat->kbd.shift, seat->kbd.alt, seat->kbd.ctrl);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue