From 54e36f6b735e88a540de77ee1e6cf84722cd0678 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 15 Mar 2023 16:11:40 -0700 Subject: [PATCH] wayland: Reset pending offset in GL path Otherwise GL surfaces that redraw without changing the hotspot have it applied on top every frame and quickly slide away. The cairo path and the X11 backend do not have this bug. --- gdk/wayland/gdkglcontext-wayland.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdkglcontext-wayland.c b/gdk/wayland/gdkglcontext-wayland.c index 7becec5ed5..b0ae79a0b7 100644 --- a/gdk/wayland/gdkglcontext-wayland.c +++ b/gdk/wayland/gdkglcontext-wayland.c @@ -65,6 +65,9 @@ gdk_wayland_gl_context_end_frame (GdkDrawContext *draw_context, int dx = impl->pending_buffer_offset_x; int dy = impl->pending_buffer_offset_y; + impl->pending_buffer_offset_x = 0; + impl->pending_buffer_offset_y = 0; + gdk_wayland_surface_sync (surface); gdk_wayland_surface_request_frame (surface); @@ -118,7 +121,7 @@ gdk_wayland_display_init_gl (GdkDisplay *display, { GdkWaylandDisplay *self = GDK_WAYLAND_DISPLAY (display); - if (!gdk_display_init_egl (display, + if (!gdk_display_init_egl (display, EGL_PLATFORM_WAYLAND_EXT, self->wl_display, TRUE,