From 961a6c12ecca10d557e89fe6db409a97d98f789b Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 9 May 2023 14:41:24 +0200 Subject: [PATCH] wayland: Don't assert when requesting another frame When GDK_DEBUG=no-vsync is on, we might have more than one outstanding frame. Don't assert when that hapens. Just request a frame callback for the first and skip the others. --- gdk/wayland/gdksurface-wayland.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index 483ccec8a2..5663a42d38 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -370,7 +370,8 @@ gdk_wayland_surface_request_frame (GdkSurface *surface) GdkWaylandSurface *self = GDK_WAYLAND_SURFACE (surface); GdkFrameClock *clock; - g_assert (self->frame_callback == NULL); + if (self->frame_callback != NULL) + return; clock = gdk_surface_get_frame_clock (surface); -- 2.30.2