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>
This commit is contained in:
Quentin Glidic 2016-08-16 11:42:47 +02:00
parent f6636a8dec
commit 6384edf025
No known key found for this signature in database
GPG key ID: AC203F96E2C34BB7
2 changed files with 6 additions and 2 deletions

View file

@ -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)

View file

@ -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) {