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:
Jasper St. Pierre 2014-01-31 16:24:19 -05:00
parent fa4bd8b042
commit 98d1b5464d

View File

@ -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);