mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
seat: guard against button count corruption
This is still a compositor bug, and bad events will be sent to clients. We'll need to track each button separately to handle this in wlroots.
This commit is contained in:
parent
f8fcd7f06a
commit
4135fafecd
1 changed files with 5 additions and 1 deletions
|
@ -346,7 +346,11 @@ uint32_t wlr_seat_pointer_notify_button(struct wlr_seat *wlr_seat,
|
|||
}
|
||||
wlr_seat->pointer_state.button_count++;
|
||||
} else {
|
||||
wlr_seat->pointer_state.button_count--;
|
||||
if (wlr_seat->pointer_state.button_count == 0) {
|
||||
wlr_log(WLR_ERROR, "Corrupted seat button count");
|
||||
} else {
|
||||
wlr_seat->pointer_state.button_count--;
|
||||
}
|
||||
}
|
||||
|
||||
struct wlr_seat_pointer_grab *grab = wlr_seat->pointer_state.grab;
|
||||
|
|
Loading…
Reference in a new issue