mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
gdkwindow-wayland: Bail out early if we get a frame callback when destroying our window
This prevents warnings like (gtk3-demo:14948): Gdk-CRITICAL **: _gdk_frame_clock_thaw: assertion 'GDK_IS_FRAME_CLOCK (clock)' failed (gtk3-demo:14948): Gdk-CRITICAL **: gdk_frame_clock_get_timings: assertion 'GDK_IS_FRAME_CLOCK (frame_clock)' failed We need to do this, as the compositor might have already sent us a frame event, in-flight, at the same time we destroy our window. In this case, we'll receive the then-in-flight "done" event, and then warn as we try to look up the frame clock on a destroyed window.
This commit is contained in:
parent
fa4bd8b042
commit
98d1b5464d
@ -403,6 +403,10 @@ on_frame_clock_after_paint (GdkFrameClock *clock,
|
||||
return;
|
||||
|
||||
impl->pending_commit = FALSE;
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
impl->pending_frame_counter = gdk_frame_clock_get_frame_counter (clock);
|
||||
|
||||
callback = wl_surface_frame (impl->surface);
|
||||
|
Loading…
Reference in New Issue
Block a user