libweston-desktop/{wl_shell, xwayland}: Fix changing between toplevel states
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
diff --git a/libweston-desktop/wl-shell.c b/libweston-desktop/wl-shell.c
index 7c6a589..74ce473 100644
--- a/libweston-desktop/wl-shell.c
+++ b/libweston-desktop/wl-shell.c
@@ -151,8 +151,10 @@
assert(state != NONE);
- if (to_add && surface->added)
+ if (to_add && surface->added) {
+ surface->state = state;
return;
+ }
if (surface->state != state) {
if (surface->state == POPUP)