Merge pull request #741 from emersion/unmapped-surface-destroy

xdg-shell, xdg-shell-v6: don't emit unmap if surface is unmapped
This commit is contained in:
Tony Crisci 2018-03-25 11:04:37 -04:00 committed by GitHub
commit 5617a59598
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -194,7 +194,9 @@ static void xdg_surface_unmap(struct wlr_xdg_surface *surface) {
assert(surface->role != WLR_XDG_SURFACE_ROLE_NONE);
// TODO: probably need to ungrab before this event
if (surface->mapped) {
wlr_signal_emit_safe(&surface->events.unmap, surface);
}
if (surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL) {
wl_resource_set_user_data(surface->toplevel->resource, NULL);

View File

@ -194,7 +194,9 @@ static void xdg_surface_unmap(struct wlr_xdg_surface_v6 *surface) {
assert(surface->role != WLR_XDG_SURFACE_V6_ROLE_NONE);
// TODO: probably need to ungrab before this event
if (surface->mapped) {
wlr_signal_emit_safe(&surface->events.unmap, surface);
}
if (surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL) {
wl_resource_set_user_data(surface->toplevel->resource, NULL);