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:
Lars Hagström 2018-02-07 17:42:31 +01:00
parent 9d7a9fc9d4
commit b181f793c3

View File

@ -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);
}