summaryrefslogtreecommitdiff
path: root/gdk/wayland/gdksurface-wayland.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2023-05-09 14:41:24 +0200
committerBenjamin Otte <otte@redhat.com>2023-05-09 16:29:41 +0200
commit961a6c12ecca10d557e89fe6db409a97d98f789b (patch)
treeaade4ffe7d82bcc2ca2d8f499151e0b828f0fe5e /gdk/wayland/gdksurface-wayland.c
parentc227493c6577cd5080f86f7bc982ed7d8f190a8b (diff)
downloadgtk+-961a6c12ecca10d557e89fe6db409a97d98f789b.tar.gz
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.
Diffstat (limited to 'gdk/wayland/gdksurface-wayland.c')
-rw-r--r--gdk/wayland/gdksurface-wayland.c3
1 files changed, 2 insertions, 1 deletions
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);