Skip to content

cursor: scale cursors to the requested size on env var "XCURSOR_RESIZED=true"

Jin Liu requested to merge jinliu/wayland:work/jinliu/cursor-scaling into main

This is to sync a recent change from libXcursor: xorg/lib/libxcursor!22 (merged)

The motivation is to unify the cursor scaling behavior in various X11 and Wayland apps / toolkits. Currently, when the cursor theme doesn't have the requested size, not all clients scale the cursor by themselves, resulting in inconsistent cursor size across clients.

This problem is especially evident in Wayland, as a HiDPI-enabled clients will request cursors in the size: "XCURSOR_SIZE * output scale" which greatly increases the chance that the cursor theme doesn't provide the requested size.

Tested with Weston. With an updated libwayland-cursor.so, and env "XCURSOR_RESIZED=true", Weston renders the cursor scaled to any XCURSOR_SIZE.

Edited by Jin Liu

Merge request reports

Loading