From b7b0042777c66565d51d2cbc7d00e48c2595d9bd Mon Sep 17 00:00:00 2001 From: Alexandros Frantzis Date: Thu, 2 Jul 2020 16:37:29 +0300 Subject: [PATCH] xwayland: Notify the shell when a window drops the fullscreen state Notify the shell of the state transition when going from fullscreen to normal toplevel window. Signed-off-by: Alexandros Frantzis --- libweston/desktop/xwayland.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libweston/desktop/xwayland.c b/libweston/desktop/xwayland.c index d6b8152e..64983613 100644 --- a/libweston/desktop/xwayland.c +++ b/libweston/desktop/xwayland.c @@ -325,16 +325,23 @@ create_surface(struct weston_desktop_xwayland *xwayland, static void set_toplevel(struct weston_desktop_xwayland_surface *surface) { + enum weston_desktop_xwayland_surface_state prev_state = surface->state; + weston_desktop_xwayland_surface_change_state(surface, TOPLEVEL, NULL, 0, 0); + + if (prev_state == FULLSCREEN) { + weston_desktop_api_fullscreen_requested(surface->desktop, + surface->surface, false, + NULL); + } } static void set_toplevel_with_position(struct weston_desktop_xwayland_surface *surface, int32_t x, int32_t y) { - weston_desktop_xwayland_surface_change_state(surface, TOPLEVEL, NULL, - 0, 0); + set_toplevel(surface); weston_desktop_api_set_xwayland_position(surface->desktop, surface->surface, x, y); }