Merge branch 'wip/fix-mask-modes-regression' into 'main'

wayland/glcontext: Don't call wl_surface.offset on old objects

See merge request GNOME/gtk!5526
This commit is contained in:
Matthias Clasen
2023-02-17 11:25:06 +00:00
2 changed files with 3 additions and 24 deletions

View File

@@ -68,7 +68,9 @@ gdk_wayland_gl_context_end_frame (GdkDrawContext *draw_context,
gdk_wayland_surface_sync (surface);
gdk_wayland_surface_request_frame (surface);
wl_surface_offset (impl->display_server.wl_surface, dx, dy);
if (wl_surface_get_version (impl->display_server.wl_surface) >=
WL_SURFACE_OFFSET_SINCE_VERSION)
wl_surface_offset (impl->display_server.wl_surface, dx, dy);
GDK_DRAW_CONTEXT_CLASS (gdk_wayland_gl_context_parent_class)->end_frame (draw_context, painted);

View File

@@ -579,35 +579,12 @@ gdk_wayland_surface_attach_image (GdkSurface *surface,
}
}
static void
gdk_wayland_surface_sync_offset (GdkSurface *surface)
{
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
if (wl_surface_get_version (impl->display_server.wl_surface) <
WL_SURFACE_OFFSET_SINCE_VERSION)
return;
#if 0
if (impl->pending_buffer_offset_x == 0 &&
impl->pending_buffer_offset_y == 0)
return;
wl_surface_offset (impl->display_server.wl_surface,
impl->pending_buffer_offset_x,
impl->pending_buffer_offset_y);
impl->pending_buffer_offset_x = 0;
impl->pending_buffer_offset_y = 0;
#endif
}
void
gdk_wayland_surface_sync (GdkSurface *surface)
{
gdk_wayland_surface_sync_shadow (surface);
gdk_wayland_surface_sync_opaque_region (surface);
gdk_wayland_surface_sync_input_region (surface);
gdk_wayland_surface_sync_offset (surface);
}
static gboolean