From b181f793c393527d6bc955b4762a6945cbe65d1b Mon Sep 17 00:00:00 2001 From: Lars Hagström Date: Wed, 7 Feb 2018 17:42:31 +0100 Subject: 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...) --- rootston/cursor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.3