mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-05-02 06:46:32 -04:00
input: fix assertion when pressing first one mouse button, then another
This commit is contained in:
parent
6e4d29ef71
commit
5f64c5c335
1 changed files with 58 additions and 59 deletions
7
input.c
7
input.c
|
|
@ -1493,8 +1493,7 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case WL_POINTER_BUTTON_STATE_PRESSED: {
|
case WL_POINTER_BUTTON_STATE_PRESSED: {
|
||||||
assert(!seat->mouse.consumed);
|
if (!seat->mouse.consumed) {
|
||||||
|
|
||||||
if (seat->wl_keyboard != NULL) {
|
if (seat->wl_keyboard != NULL) {
|
||||||
/* Seat has keyboard - use mouse bindings *with* modifiers */
|
/* Seat has keyboard - use mouse bindings *with* modifiers */
|
||||||
|
|
||||||
|
|
@ -1557,14 +1556,14 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!seat->mouse.consumed &&
|
if (!term_mouse_grabbed(term, seat) &&
|
||||||
!term_mouse_grabbed(term, seat) &&
|
|
||||||
cursor_is_on_grid)
|
cursor_is_on_grid)
|
||||||
{
|
{
|
||||||
term_mouse_down(
|
term_mouse_down(
|
||||||
term, button, seat->mouse.row, seat->mouse.col,
|
term, button, seat->mouse.row, seat->mouse.col,
|
||||||
seat->kbd.shift, seat->kbd.alt, seat->kbd.ctrl);
|
seat->kbd.shift, seat->kbd.alt, seat->kbd.ctrl);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue