summaryrefslogtreecommitdiff
path: root/libweston-desktop
diff options
context:
space:
mode:
authorQuentin Glidic <sardemff7+git@sardemff7.net>2016-08-16 11:42:47 +0200
committerQuentin Glidic <sardemff7+git@sardemff7.net>2016-08-16 11:57:21 +0200
commit6384edf0252e25b2b77d0156e247e8302f318657 (patch)
tree652e7a19fb1a607e71646222d46c6465f197bf76 /libweston-desktop
parentf6636a8dec24340b9ec4ec5a1171d3efabf3904a (diff)
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>
Diffstat (limited to 'libweston-desktop')
-rw-r--r--libweston-desktop/wl-shell.c4
-rw-r--r--libweston-desktop/xwayland.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/libweston-desktop/wl-shell.c b/libweston-desktop/wl-shell.c
index 7c6a5899..74ce4731 100644
--- a/libweston-desktop/wl-shell.c
+++ b/libweston-desktop/wl-shell.c
@@ -151,8 +151,10 @@ weston_desktop_wl_shell_change_state(struct weston_desktop_wl_shell_surface *sur
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)
diff --git a/libweston-desktop/xwayland.c b/libweston-desktop/xwayland.c
index da04f7f8..cb083237 100644
--- a/libweston-desktop/xwayland.c
+++ b/libweston-desktop/xwayland.c
@@ -75,8 +75,10 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
assert(state != NONE);
- if (to_add && surface->added)
+ if (to_add && surface->added) {
+ surface->state = state;
return;
+ }
if (surface->state != state) {
if (surface->state == XWAYLAND) {