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'.
This commit is contained in:
Matthias Clasen 2024-01-28 08:40:51 -05:00
parent 1097e1349c
commit f5308dfbec

View File

@ -87,9 +87,8 @@ static void
gdk_wayland_gl_context_empty_frame (GdkDrawContext *draw_context) gdk_wayland_gl_context_empty_frame (GdkDrawContext *draw_context)
{ {
GdkSurface *surface = gdk_draw_context_get_surface (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_sync (surface);
gdk_wayland_surface_request_frame (surface); gdk_wayland_surface_request_frame (surface);