aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hagström <lars@foldspace.nu>2018-02-07 17:42:31 +0100
committerLars Hagström <lars@foldspace.nu>2018-02-07 17:42:31 +0100
commitb181f793c393527d6bc955b4762a6945cbe65d1b (patch)
treeeafc38f11c2db1ff62562e6db2acb9deb608c9d8
parent9d7a9fc9d4b9dbe997120f37bb7bc62aed361e0b (diff)
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...)
-rw-r--r--rootston/cursor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index d8753f44..717a3da8 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -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);
}