Unmap wlr_surface before making its role object inert

This commit is contained in:
Kirill Primak 2023-07-26 23:07:28 +03:00 committed by Simon Ser
parent 529f1b82ee
commit 7df11ada5e
4 changed files with 8 additions and 0 deletions

View file

@ -20,6 +20,8 @@ static const struct zwp_input_method_v2_interface input_method_impl;
static const struct zwp_input_method_keyboard_grab_v2_interface keyboard_grab_impl;
static void popup_surface_destroy(struct wlr_input_popup_surface_v2 *popup_surface) {
wlr_surface_unmap(popup_surface->surface);
wl_signal_emit_mutable(&popup_surface->events.destroy, NULL);
wl_list_remove(&popup_surface->link);
wl_resource_set_user_data(popup_surface->resource, NULL);

View file

@ -23,6 +23,8 @@ static const struct zwlr_layer_shell_v1_interface layer_shell_implementation;
static const struct zwlr_layer_surface_v1_interface layer_surface_implementation;
static void layer_surface_destroy(struct wlr_layer_surface_v1 *surface) {
wlr_surface_unmap(surface->surface);
wl_signal_emit_mutable(&surface->events.destroy, surface);
wl_resource_set_user_data(surface->resource, NULL);
free(surface->namespace);

View file

@ -23,6 +23,8 @@ static const struct ext_session_lock_v1_interface lock_implementation;
static const struct ext_session_lock_surface_v1_interface lock_surface_implementation;
static void lock_surface_destroy(struct wlr_session_lock_surface_v1 *lock_surface) {
wlr_surface_unmap(lock_surface->surface);
wl_signal_emit_mutable(&lock_surface->events.destroy, NULL);
wl_list_remove(&lock_surface->link);

View file

@ -29,6 +29,8 @@ static void subsurface_destroy(struct wlr_subsurface *subsurface) {
wlr_surface_unlock_cached(subsurface->surface, subsurface->cached_seq);
}
wlr_surface_unmap(subsurface->surface);
wl_signal_emit_mutable(&subsurface->events.destroy, subsurface);
wl_list_remove(&subsurface->surface_client_commit.link);