wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

XCURSOR_SIZE makes cursor in Xwayland too small when using hidpi patch

Open krims0n32 opened this issue 9 months ago • 1 comments

Describe the bug input.cursor_size set to 24 which is perfect for Wayland forces XCURSOR_SIZE to 24 as well which makes the cursor too small in XWayland apps when using the xprop hidpi patch.

To Reproduce Steps to reproduce the behavior:

  1. Run wayfire with hidpi xprop patch
  2. xprop -root -format _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
  3. have input.cursor_size set to 24
  4. launch Steam or any other X app
  5. cursor is half the size it should be

Expected behavior I'm not sure how this could be tackled, but right now I have to env XCURSOR_SIZE=48 steam for every X app that I use (granted, there aren't that many). Perhaps setting XCURSOR_SIZE could be made optional?

Wayfire version wayfire-hidpi-xprop-git 0.9.0.r71.g179b604b-1 wayfire-plugins-extra-git r283.75f82c4-1

krims0n32 avatar Mar 13 '25 07:03 krims0n32

I read a bit in this blog here: https://blogs.kde.org/2024/10/09/cursor-size-problems-in-wayland-explained/

I am still not sure how to handle this properly so that it works with all applications. If we don't set XCURSOR_SIZE as you suggest, some apps might not use the correct cursor size (the user will have to set it for all applications which depend on it). On the other hand:

they interpret XCURSOR_SIZE differently: in X11, the size is in physical pixels, but in Wayland it's in logical pixels. E.g., if you have a cursor size 24 and global scale 2x, then in X11, XCURSOR_SIZE should be 48, but in Wayland it should be 24.

It also seems that modern apps are using other channels to get this information from. I would suggest trying to patch wayfire to multiply the XCURSOR_SIZE by the xwayland scale factor, as this is the correct behavior for X11 apps anyway (but that would need to be added to the hidpi patch sets, not in upstream wayfire)

ammen99 avatar Mar 25 '25 22:03 ammen99

Is this still an issue, I heard that xwayland's scaling has been updated once again to not require compositor patches anymore?

ammen99 avatar Jun 23 '25 10:06 ammen99

I'm not sure, I am not on Wayfire anymore. In any case, with the increasing popularity of Wayland I would not put any time in this currently. At some point I figure the Steam desktop will also finally move to Wayland as well.

krims0n32 avatar Jun 23 '25 10:06 krims0n32

Alright, I am closing this issue then as I suspect it might have been solved already. Thanks for your response ;)

ammen99 avatar Jun 23 '25 10:06 ammen99