diff --git a/libweston-desktop/xdg-shell-v6.c b/libweston-desktop/xdg-shell-v6.c index ff3a6344..13f4213d 100644 --- a/libweston-desktop/xdg-shell-v6.c +++ b/libweston-desktop/xdg-shell-v6.c @@ -841,6 +841,14 @@ weston_desktop_xdg_popup_committed(struct weston_desktop_xdg_popup *popup) popup->committed = true; weston_desktop_xdg_popup_update_position(popup->base.desktop_surface, popup); + + if (!weston_surface_is_mapped(wsurface) && + weston_surface_has_content(wsurface)) { + weston_surface_map(wsurface); + } else if (weston_surface_is_mapped(wsurface) && + !weston_surface_has_content(wsurface)) { + weston_surface_unmap(wsurface); + } } static void diff --git a/libweston-desktop/xdg-shell.c b/libweston-desktop/xdg-shell.c index 4b0509b1..eea00143 100644 --- a/libweston-desktop/xdg-shell.c +++ b/libweston-desktop/xdg-shell.c @@ -962,6 +962,14 @@ weston_desktop_xdg_popup_committed(struct weston_desktop_xdg_popup *popup) popup->committed = true; weston_desktop_xdg_popup_update_position(popup->base.desktop_surface, popup); + + if (!weston_surface_is_mapped(wsurface) && + weston_surface_has_content(wsurface)) { + weston_surface_map(wsurface); + } else if (weston_surface_is_mapped(wsurface) && + !weston_surface_has_content(wsurface)) { + weston_surface_unmap(wsurface); + } } static void