mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
wayland: Work around mutter deficiences
Add the environment variable NO_POINTER_VIEWPORT to force the use of buffer scale for pointer surfaces. This is a temporary workaround for https://gitlab.gnome.org/GNOME/mutter/-/issues/2633.
This commit is contained in:
parent
8d5633cb88
commit
c5d05fdc88
@ -265,15 +265,20 @@ gdk_wayland_device_update_surface_cursor (GdkDevice *device)
|
||||
guint next_image_index, next_image_delay;
|
||||
gboolean retval = G_SOURCE_REMOVE;
|
||||
GdkWaylandTabletData *tablet;
|
||||
gboolean use_viewport;
|
||||
|
||||
tablet = gdk_wayland_seat_find_tablet (seat, device);
|
||||
|
||||
use_viewport = pointer->pointer_surface_viewport != NULL;
|
||||
if (g_getenv ("NO_POINTER_VIEWPORT"))
|
||||
use_viewport = FALSE;
|
||||
|
||||
if (pointer->cursor)
|
||||
{
|
||||
buffer = _gdk_wayland_cursor_get_buffer (GDK_WAYLAND_DISPLAY (seat->display),
|
||||
pointer->cursor,
|
||||
pointer->current_output_scale,
|
||||
pointer->pointer_surface_viewport != NULL,
|
||||
use_viewport,
|
||||
pointer->cursor_image_index,
|
||||
&x, &y, &w, &h, &scale);
|
||||
}
|
||||
@ -312,7 +317,7 @@ gdk_wayland_device_update_surface_cursor (GdkDevice *device)
|
||||
if (buffer)
|
||||
{
|
||||
wl_surface_attach (pointer->pointer_surface, buffer, 0, 0);
|
||||
if (pointer->pointer_surface_viewport)
|
||||
if (use_viewport)
|
||||
{
|
||||
wp_viewport_set_source (pointer->pointer_surface_viewport,
|
||||
wl_fixed_from_int (0),
|
||||
|
Loading…
Reference in New Issue
Block a user