mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-30 00:15:58 +01:00
Make pointer button release outside window still count down the button_count.
When double-clicking a maximized window title, so that the windows size is restored and the mouse pointer ends up _outside_ the window it becomes impossible to move windows. The reason is that the button_count variable is not counted down if the mouse button is released outside the window, so the button_count remains incremented even after the button is released. This patch adds a call to wlr_seat_pointer_notify_button if the mouse button is released outside the window. (I am a complete noob to wlroots, so be kind...)
This commit is contained in:
parent
9d7a9fc9d4
commit
b181f793c3
1 changed files with 3 additions and 1 deletions
|
@ -261,7 +261,9 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
|
|||
}
|
||||
}
|
||||
|
||||
if (view && surface) {
|
||||
if ((view && surface) ||
|
||||
(state == WLR_BUTTON_RELEASED &&
|
||||
seat->seat->pointer_state.button_count != 0)) {
|
||||
if (!is_touch) {
|
||||
wlr_seat_pointer_notify_button(seat->seat, time, button, state);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue