backends: Use standard cursor names from the CSS specification

This is the preferred name set, and handled by adwaita icon theme.
Use the names from https://www.w3.org/TR/css-ui-4/#cursor, like
GDK does at https://docs.gtk.org/gdk4/ctor.Cursor.new_from_name.html.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3040
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3295>
This commit is contained in:
Carlos Garnacho 2023-09-22 18:06:31 +02:00 committed by Marge Bot
parent a2a4067e07
commit d970c9db1a

View File

@ -50,41 +50,41 @@ translate_meta_cursor (MetaCursor cursor)
switch (cursor)
{
case META_CURSOR_DEFAULT:
return "left_ptr";
return "default";
case META_CURSOR_NORTH_RESIZE:
return "top_side";
return "n-resize";
case META_CURSOR_SOUTH_RESIZE:
return "bottom_side";
return "s-resize";
case META_CURSOR_WEST_RESIZE:
return "left_side";
return "w-resize";
case META_CURSOR_EAST_RESIZE:
return "right_side";
return "e-resize";
case META_CURSOR_SE_RESIZE:
return "bottom_right_corner";
return "se-resize";
case META_CURSOR_SW_RESIZE:
return "bottom_left_corner";
return "sw-resize";
case META_CURSOR_NE_RESIZE:
return "top_right_corner";
return "ne-resize";
case META_CURSOR_NW_RESIZE:
return "top_left_corner";
return "nw-resize";
case META_CURSOR_MOVE_OR_RESIZE_WINDOW:
return "fleur";
return "move";
case META_CURSOR_BUSY:
return "watch";
return "wait";
case META_CURSOR_DND_IN_DRAG:
return "dnd-none";
return "no-drop";
case META_CURSOR_DND_MOVE:
return "dnd-move";
return "grabbing";
case META_CURSOR_DND_COPY:
return "dnd-copy";
return "copy";
case META_CURSOR_DND_UNSUPPORTED_TARGET:
return "dnd-none";
return "no-drop";
case META_CURSOR_POINTING_HAND:
return "hand2";
return "pointer";
case META_CURSOR_CROSSHAIR:
return "crosshair";
case META_CURSOR_IBEAM:
return "xterm";
return "text";
case META_CURSOR_BLANK:
case META_CURSOR_NONE:
case META_CURSOR_LAST: