wayland: Split out a function
We have a create_wl_surface(), create a matching destroy_wl_surface().
This commit is contained in:
@@ -910,6 +910,17 @@ gdk_wayland_surface_create_wl_surface (GdkSurface *surface)
|
||||
self->display_server.wl_surface = wl_surface;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_surface_destroy_wl_surface (GdkWaylandSurface *self)
|
||||
{
|
||||
g_clear_pointer (&self->display_server.viewport, wp_viewport_destroy);
|
||||
g_clear_pointer (&self->display_server.fractional_scale, wp_fractional_scale_v1_destroy);
|
||||
|
||||
g_clear_pointer (&self->display_server.wl_surface, wl_surface_destroy);
|
||||
|
||||
g_clear_pointer (&self->display_server.outputs, g_slist_free);
|
||||
}
|
||||
|
||||
static void
|
||||
maybe_notify_mapped (GdkSurface *surface)
|
||||
{
|
||||
@@ -1075,13 +1086,7 @@ gdk_wayland_surface_hide_surface (GdkSurface *surface)
|
||||
impl->initial_configure_received = FALSE;
|
||||
}
|
||||
|
||||
g_clear_pointer (&impl->display_server.fractional_scale, wp_fractional_scale_v1_destroy);
|
||||
g_clear_pointer (&impl->display_server.viewport, wp_viewport_destroy);
|
||||
|
||||
g_clear_pointer (&impl->display_server.wl_surface, wl_surface_destroy);
|
||||
|
||||
g_slist_free (impl->display_server.outputs);
|
||||
impl->display_server.outputs = NULL;
|
||||
gdk_wayland_surface_destroy_wl_surface (impl);
|
||||
}
|
||||
|
||||
impl->has_uncommitted_ack_configure = FALSE;
|
||||
|
||||
Reference in New Issue
Block a user