From f5308dfbec90ab716bb1a6baff458cabd2e3388f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 28 Jan 2024 08:40:51 -0500 Subject: [PATCH] wayland: Commit empty frames if needed If we have outstanding double-buffered state (other than the buffer itself), commit a frame even if its 'empty'. --- gdk/wayland/gdkglcontext-wayland.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gdk/wayland/gdkglcontext-wayland.c b/gdk/wayland/gdkglcontext-wayland.c index bae8440fee..13b17cd60c 100644 --- a/gdk/wayland/gdkglcontext-wayland.c +++ b/gdk/wayland/gdkglcontext-wayland.c @@ -87,9 +87,8 @@ static void gdk_wayland_gl_context_empty_frame (GdkDrawContext *draw_context) { GdkSurface *surface = gdk_draw_context_get_surface (draw_context); - GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface); - if (impl->has_pending_subsurface_commits) + if (gdk_wayland_surface_needs_commit (surface)) { gdk_wayland_surface_sync (surface); gdk_wayland_surface_request_frame (surface);