forked from AuroraMiddleware/gtk
broadway: Disconnect from the frame clock
The frame clock can no survive its surface, so we need to disconnect signal handlers.
This commit is contained in:
parent
a3f127b0d0
commit
28addd3775
@ -184,6 +184,17 @@ connect_frame_clock (GdkSurface *surface)
|
||||
G_CALLBACK (on_frame_clock_after_paint), surface);
|
||||
}
|
||||
|
||||
static void
|
||||
disconnect_frame_clock (GdkSurface *surface)
|
||||
{
|
||||
GdkFrameClock *frame_clock = gdk_surface_get_frame_clock (surface);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (frame_clock,
|
||||
on_frame_clock_before_paint, surface);
|
||||
g_signal_handlers_disconnect_by_func (frame_clock,
|
||||
on_frame_clock_after_paint, surface);
|
||||
}
|
||||
|
||||
GdkSurface *
|
||||
_gdk_broadway_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
@ -254,6 +265,8 @@ _gdk_broadway_surface_destroy (GdkSurface *surface,
|
||||
|
||||
impl = GDK_BROADWAY_SURFACE (surface);
|
||||
|
||||
disconnect_frame_clock (surface);
|
||||
|
||||
if (impl->node_data)
|
||||
g_array_unref (impl->node_data);
|
||||
if (impl->node_data_textures)
|
||||
|
Loading…
Reference in New Issue
Block a user