[PATCH weston] libweston-desktop/xdg-shell-v6: Actually send same-as-current configure if needed

Quentin Glidic sardemff7+wayland at sardemff7.net
Tue Oct 17 14:18:51 UTC 2017


From: Quentin Glidic <sardemff7+git at sardemff7.net>

If a surface is in state A, and we just sent a configure for state B,
setting back state A would be ignored, because state B has not been
committed yet.
Since we only send a configure event if the state was different,
consider pending as different if the configure list is not empty.

Reported on wlroots https://github.com/swaywm/wlroots/pull/280

Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---
 libweston-desktop/xdg-shell-v6.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libweston-desktop/xdg-shell-v6.c b/libweston-desktop/xdg-shell-v6.c
index d82a507fa..2abd02a3e 100644
--- a/libweston-desktop/xdg-shell-v6.c
+++ b/libweston-desktop/xdg-shell-v6.c
@@ -906,6 +906,9 @@ weston_desktop_xdg_toplevel_state_compare(struct weston_desktop_xdg_toplevel *to
 	if (!toplevel->base.configured)
 		return false;
 
+	if (!wl_list_empty(&toplevel->base.configure_list))
+		return false;
+
 	if (toplevel->pending.state.activated != toplevel->current.state.activated)
 		return false;
 	if (toplevel->pending.state.fullscreen != toplevel->current.state.fullscreen)
-- 
2.13.4



More information about the wayland-devel mailing list