mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 20:08:25 +02:00
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
2 changed files with 16 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue