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 pointer under wayland #96459

Open
DavidGasku opened this issue Sep 2, 2024 · 9 comments
Open

Tiny mouse pointer under wayland #96459

DavidGasku opened this issue Sep 2, 2024 · 9 comments

Comments

@DavidGasku
Copy link

Tested versions

Godot v4.3.stable

System information

Godot v4.3.stable - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Mon Aug 19 09:51:26 UTC 2024 - Wayland - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (nvidia; 550.107.02) - 12th Gen Intel(R) Core(TM) i5-12400F (12 Threads)

Issue description

Screencast_20240902_080033.webm

As seen in the video, the mouse is tiny compared with the OS one (the size changes when hovering the system titlebar)

Steps to reproduce

Just start godot with wayland support (--display-driver wayland) under linux

Minimal reproduction project (MRP)

Not applicable

@hunterkepley
Copy link
Contributor

hunterkepley commented Sep 2, 2024

Could you set the env var XCURSOR_SIZE to 35 and see if it makes it larger, or if there is an error. It seems there's a default size of 24 if there's an error, but I want to see if this can be resolved (as a workaround) by adding XCURSOR_SIZE to your preferred size in your bash.rc. If not, might be good to update the default size from 24 to something larger.

@hunterkepley
Copy link
Contributor

hunterkepley commented Sep 2, 2024

Source for this env var:

unscaled_cursor_size = OS::get_singleton()->get_environment("XCURSOR_SIZE").to_int();

unscaled_cursor_size = 24;

@DavidGasku
Copy link
Author

DavidGasku commented Sep 2, 2024

Doesn't seem to make any difference, the cursor is always the same size.
Terminal shows no errors (just discovered a segmentation fault on exit, but probably was there before and didn't notice it and is unrelated)

I've tested several scaling values (both in godot and in kde) and the cursor size is actually smaller with higher kde fractional values. First image is 150%, second one is 100%.

Screenshot_20240902_124809
Screenshot_20240902_124728

In case is needed, I´m using a single 4K monitor.

@hunterkepley
Copy link
Contributor

hunterkepley commented Sep 3, 2024

im gonna upgrade to the newest fedora so i can test out with wayland today, want to take a crack at it. thanks for trying that out

my guess is it may be due to the 4k monitor, but thats just a guess

@hunterkepley
Copy link
Contributor

@DavidGasku Did some poking around on the internet, this is a common problem with older versions of wayland/specific versions.

https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5481
https://www.reddit.com/r/kde/comments/133dkad/gtk_mouse_scaling_on_wayland/
https://invent.kde.org/plasma/breeze/-/merge_requests/380
kovidgoyal/kitty#2647
swaywm/sway#4610
https://www.reddit.com/r/swaywm/comments/n2ha58/tiny_cursor_on_chromium_using_ozone_platform/

It seems that GNOME has a merged fix (see the top link in this comment)- but it is platform dependent as well as Qt/GTK dependent.

Not sure if this is something related to Godot, to be honest, and fixing it would be changing your wayland settings through godot, which I believe would be the wrong solution

Could you provide more info about your setup/system? I see you are on manjaro, would this happen to be using Breeze, Gnome, or another DE?

tl;dr I think this issue is not a godot problem, but a wayland problem

@hunterkepley
Copy link
Contributor

Cannot reproduce with Fedora 39 - KDE using Wayland (all up-to-date besides fedora version)

@DavidGasku
Copy link
Author

I'm using KDE. Anyway, feel free to close it if you can't reproduce it. I'll wait on X11 until multiwindow is implemented.

@otonashixav
Copy link
Contributor

otonashixav commented Jan 15, 2025

Can reproduce on openSUSE Tumbleweed 20250113 running KDE Plasma 6.2.5 with both v4.3 stable and commit da4f933. My experience is identically flawed except additionally the cursor obviously is using the wrong theme as it's black instead of white.

@snoopdouglas
Copy link
Contributor

snoopdouglas commented Feb 23, 2025

Managed to miss this when searching for issues before opening #103170. This issue persists on 4.4-beta1.

In my case, setting XCURSOR_THEME did the trick - as I'm using GNOME with the default Adwaita theme, this was:

XCURSOR_THEME=Adwaita

Whether or not the cursor is 'tiny' without setting this environment variable seems to depend on the distro and DE you're using. On Ubuntu 24.04, you just get the light themed cursor rather than the tiny one.

The cursor you're seeing here is actually the default 'HighContrast' X cursor theme, from what I can tell - which only has one (tiny) size.

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

No branches or pull requests

5 participants