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

2017-07-28 Thread Quentin Glidic

On 7/28/17 2:11 PM, Philipp Kerling wrote:

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 


I’ll take that as a bug fix, so let’s land it in beta.

Added a couple of variables to avoid the long lines breaks and:
Reviewed-by: Quentin Glidic 

Then pushed:
e3715527..c5f12416  master -> master

Thanks!


---
  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(>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(>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(>base, _grab_interface, shsurf,
 pointer, edges);
  
___

wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel




--

Quentin “Sardem FF7” Glidic
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


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

2017-07-28 Thread Philipp Kerling
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 
---
 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(>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(>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(>base, _grab_interface, shsurf,
 pointer, edges);
 
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel