jay icon indicating copy to clipboard operation
jay copied to clipboard

Inconsistent cursor size between native wayland and xwayland windows under 2x scale 4k screen.

Open Nojike opened this issue 8 months ago • 4 comments

Have xwayland = { scaling-mode = "downscaled" } in my config file, xcursor size set to be 24(in dconf editor) cursor look like 2x small when hover above xwayland windows than wayland windows. krita and pixeloramo have same size as wayland windows but a some artifact on the bottom of the cursor. games run with proton have half size of cursor.

Nojike avatar Mar 12 '26 08:03 Nojike

This behavior does not seem unexpected. In downscaled mode with a 2x scale, everything is downscaled by 2x including the cursor images attach by the application. You'll need to use per-application settings to tell the application to scale its UI by 2x too.

mahkoh avatar Mar 12 '26 09:03 mahkoh

I managed to solve this problem by using xsetroot to set Xwayland's cursor size to 48. However, apps like Steam don't seem to respect this change and still use the default size of 24. For that, xrdb needs to be used to add the Xcursor.size variable to the X resources database. The value of said variable needs to be 48 as well.

effects3d avatar Mar 12 '26 12:03 effects3d

I managed to solve this problem by using xsetroot to set Xwayland's cursor size to 48. However, apps like Steam don't seem to respect this change and still use the default size of 24. For that, xrdb needs to be used to add the Xcursor.size variable to the X resources database. The value of said variable needs to be 48 as well.

This problem does not exit on hyprland with this package https://aur.archlinux.org/packages/hyprland-hidpi-xprop-git along with this patched xwayland https://aur.archlinux.org/packages/xorg-xwayland-hidpi-xprop

related pr https://github.com/hyprwm/Hyprland/pull/6446

Nojike avatar Mar 12 '26 12:03 Nojike

@effectsbot could you show me how to do it? I use "xsetroot -xcf /usr/share/icons/$your_cursor_theme_name/cursors/left_ptr 48"(had changed to my system's cursor theme) from https://labwc.github.io/hidpi-scaling.html#xwayland-applications but cursor size on some old games remained small.while assigned cursor size is correct but application's (e.g. pixelorama) self rendered cursors become twice as big.

Nojike avatar Mar 12 '26 13:03 Nojike