xdg-shell: Mark xdg_popup surfaces as mapped
Keep the surface map state in sync with the buffer state: the surface can be mapped it has a valid buffer, and not if it doesn't. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
c0ff9ed24a
commit
f1fe6ec776
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user