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(-) (limited to 'rootston') 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 From 099c80e7d6b27ad122d15e96a02816039157d3f7 Mon Sep 17 00:00:00 2001 From: Vincent Vanlaer Date: Wed, 7 Feb 2018 18:36:08 +0100 Subject: Fix jitter when quickly resizing windows Surfaces and views get resized only on commit, therefore we may only change the position of a window if there are no pending commits. --- rootston/xdg_shell_v6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rootston') diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c index 0515263b..41353199 100644 --- a/rootston/xdg_shell_v6.c +++ b/rootston/xdg_shell_v6.c @@ -101,7 +101,7 @@ static void move_resize(struct roots_view *view, double x, double y, constrained_height); if (serial > 0) { roots_surface->pending_move_resize_configure_serial = serial; - } else { + } else if(roots_surface->pending_move_resize_configure_serial == 0) { view->x = x; view->y = y; } -- cgit v1.2.3 From 712665b83b83871c52144ea36fe9469ad06b5107 Mon Sep 17 00:00:00 2001 From: Vincent Vanlaer Date: Wed, 7 Feb 2018 20:26:30 +0100 Subject: Fix style error --- rootston/xdg_shell_v6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rootston') diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c index 41353199..884d0d05 100644 --- a/rootston/xdg_shell_v6.c +++ b/rootston/xdg_shell_v6.c @@ -101,7 +101,7 @@ static void move_resize(struct roots_view *view, double x, double y, constrained_height); if (serial > 0) { roots_surface->pending_move_resize_configure_serial = serial; - } else if(roots_surface->pending_move_resize_configure_serial == 0) { + } else if (roots_surface->pending_move_resize_configure_serial == 0) { view->x = x; view->y = y; } -- cgit v1.2.3