[PATCH weston] desktop-shell: Set surface resizing state during interactive resize

Philipp Kerling pkerling at casix.org
Fri Jul 28 12:11:58 UTC 2017


xdg_shell requires this information to be shared with the client in
order to conform with the specification.

The code to forward this to the client by way of a configure() event
is already in place and works fine, it was just never being used until
now.

Signed-off-by: Philipp Kerling <pkerling at casix.org>
---
 desktop-shell/shell.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 4608cf2f..f0b76352 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -1638,6 +1638,8 @@ resize_grab_button(struct weston_pointer_grab *grab,
 
 	if (pointer->button_count == 0 &&
 	    state == WL_POINTER_BUTTON_STATE_RELEASED) {
+		weston_desktop_surface_set_resizing(
+			resize->base.shsurf->desktop_surface, false);
 		shell_grab_end(&resize->base);
 		free(grab);
 	}
@@ -1648,6 +1650,8 @@ resize_grab_cancel(struct weston_pointer_grab *grab)
 {
 	struct weston_resize_grab *resize = (struct weston_resize_grab *) grab;
 
+	weston_desktop_surface_set_resizing(resize->base.shsurf->desktop_surface,
+					    false);
 	shell_grab_end(&resize->base);
 	free(grab);
 }
@@ -1731,6 +1735,7 @@ surface_resize(struct shell_surface *shsurf,
 	resize->height = geometry.height;
 
 	shsurf->resize_edges = edges;
+	weston_desktop_surface_set_resizing(shsurf->desktop_surface, true);
 	shell_grab_start(&resize->base, &resize_grab_interface, shsurf,
 			 pointer, edges);
 


More information about the wayland-devel mailing list