Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiny mouse cursor in the app window with 125% fractional scaling enabled in Wayland #16679

Open
archerallstars opened this issue Jun 12, 2024 · 2 comments · May be fixed by #16683
Open

Tiny mouse cursor in the app window with 125% fractional scaling enabled in Wayland #16679

archerallstars opened this issue Jun 12, 2024 · 2 comments · May be fixed by #16683

Comments

@archerallstars
Copy link

archerallstars commented Jun 12, 2024

First and foremost consider this:

  • Only RetroArch bugs should be filed here. Not core bugs or game bugs
  • This is not a forum or a help section, this is strictly developer oriented

Description

The mouse cursor is tiny with 125% fractional scaling enabled in Wayland session, as shown in the screen recording below:

RetroArch.tiny.mouse.cursor.mp4

I tried setting XCURSOR_THEME=Adwaita and XCURSOR_SIZE=32 environment variables to match my system setting, but it doesn't work.

*This issue is not occurring if I force the app to run in XWayland mode.

**This issue is not occurring under Wayland in fullscreen mode, as shown in the screenshot below, but the cursor theme is not matching with the system:

ssssssss

Expected behavior

The mouse cursor scale correctly in Wayland with fractional scaled display.

Actual behavior

The mouse cursor doesn't scale correctly under Wayland with fractional scaled display, and also doesn't respect XCURSOR_SIZE environment variable.

Steps to reproduce the bug

  1. Using Wayland.
  2. Enable fractional scaling.
  3. Open the app in native Wayland mode. See the tiny cursor inside the app window.

Bisect Results

I just start using RetroArch today on PC (usually on my Android box). I am not sure when this happened.

But running the app in verbose mode gives me 2 Wayland related info:

[INFO] [Wayland]: Compositor doesn't support zxdg_decoration_manager_v1 protocol
[INFO] [Wayland]: fractional_scale_v1 enabled

Version/Commit

  • RetroArch: 1.19.0/00b8a5f

I install the app from Flathub.

Environment information

  • OS: openSUSE Tumbleweed, Linux 6.9.3-1-default
@ColinKinloch
Copy link
Contributor

Ah, interesting.
I can reproduce this, it doesn't seem to be a fractional scaling issue.
In Gnome settings Accessibility > Seeing > Cursor Size to larger than default.

Screencast.from.2024-06-12.16-16-59.webm

@ColinKinloch
Copy link
Contributor

libdecor has some code for getting the desktops cursor theme and size. Unfortunately it's part of the internal API.
Once we have that info we need to request a big enough cursor buffer with wl_cursor_theme_load.
Then scale it with wl_surface_set_buffer_scale or wp_viewporter.
https://gitlab.freedesktop.org/libdecor/libdecor/-/blob/c2bd8ad6fa42c0cb17553ce77ad8a87d1f543b1f/src/desktop-settings.c#L122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants