wayland: Avoid more legacy cursor names

Set the cursor from a standard name instead of relying on the X11
cursor font derived enum values.
This commit is contained in:
Matthias Clasen
2023-12-08 14:09:48 +04:00
parent 262be35f43
commit 44f7cb1c55
3 changed files with 6 additions and 3 deletions

View File

@ -350,7 +350,7 @@ _gdk_wayland_cursor_init (GdkWaylandCursor *cursor)
{
}
static GdkCursor *
GdkCursor *
_gdk_wayland_display_get_cursor_for_name_with_scale (GdkDisplay *display,
const gchar *name,
guint scale)

View File

@ -524,8 +524,8 @@ gdk_wayland_device_set_window_cursor (GdkDevice *device,
{
guint scale = pointer->current_output_scale;
cursor =
_gdk_wayland_display_get_cursor_for_type_with_scale (seat->display,
GDK_LEFT_PTR,
_gdk_wayland_display_get_cursor_for_name_with_scale (seat->display,
"default",
scale);
}
else

View File

@ -70,6 +70,9 @@ GdkCursor *_gdk_wayland_display_get_cursor_for_type_with_scale (GdkDisplay *d
guint scale);
GdkCursor *_gdk_wayland_display_get_cursor_for_name (GdkDisplay *display,
const gchar *name);
GdkCursor *_gdk_wayland_display_get_cursor_for_name_with_scale (GdkDisplay *display,
const gchar *name,
guint scale);
GdkCursor *_gdk_wayland_display_get_cursor_for_surface (GdkDisplay *display,
cairo_surface_t *surface,
gdouble x,