Opened 18 months ago
Last modified 10 months ago
#6649 new defect
Can't move cursor through the entire screen on Linux with GNOME and Wayland
Reported by: | Agon | Owned by: | Vladislav Belov |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 27 |
Component: | UI – Game setup | Keywords: | cursor unable click fedora dnf |
Cc: | Agon | Patch: | Phab:D4974 |
Description (last modified by )
I have installed the game on my fedora machine using
dnf install 0ad
On the opening screen, I could only move my cursor over a small area.
E.g. I could click to enable feedback, but could not click on the left panel, on "Learn to play", all the way down to "Donate".
In the image, the blue area is the area in which I can move the mouse cursor, I can't reach anything outside of it.
I have reinstalled 0ad using the flatpak on registry.fedoraproject.org and this works alright.
Attachments (1)
Change History (21)
by , 18 months ago
Attachment: | 0ad-cursor-bug.jpg added |
---|
comment:1 by , 17 months ago
Hey could you upload the logs ? See GameDataPaths and ReportingErrors. It looks like a desktop manager issue. Has it been reported to Fedora too?
comment:2 by , 17 months ago
Milestone: | → Alpha 27 |
---|
comment:3 by , 17 months ago
If you're using Wayland could you add the borderless.fullscreen = "false"
line into your user.cfg file (you might find path to it here: GameDataPaths#Linux)? Also does the issue happen in a window mode?
comment:4 by , 17 months ago
I get the same thing on Ubuntu 22.04 and 22.10.
To reproduce:
- Use the package from the repos, not the snap.
- Seems to happen only on HiDPI displays in fullscreen. I experience it on a 2000x3000 and a 4K display, with fractional scaling set to 1.75 and 1.25, respectively.
- Start 0ad with Wayland: '#SDL_VIDEODRIVER=wayland 0ad'
comment:6 by , 17 months ago
I tried setting highdpi = "true" and it still limited me. Then I noticed that if I broke out of the app by switching to another and then back (I was trying to get screenshots for this), I could access the whole screen properly. I'm using GNOME 4x & mutter, not sure if that plays into this at all.
comment:7 by , 15 months ago
Another random idea (requires compiling). Replace the following line in VideoMode.cpp
:
m_WindowedX = m_WindowedY = SDL_WINDOWPOS_CENTERED_DISPLAY(m_ConfigDisplay);
By the following block:
if (fullscreen) m_WindowedX = m_WindowedY = SDL_WINDOWPOS_UNDEFINED_DISPLAY(m_ConfigDisplay); else m_WindowedX = m_WindowedY = SDL_WINDOWPOS_CENTERED_DISPLAY(m_ConfigDisplay);
comment:8 by , 14 months ago
I wasn't able to reproduce with:
- on a 4K TV monitor (2 monitor setup)
- scaling set to 1,25
- α26 and svn
- with
SDL_VIDEODRIVER=wayland
- I use sway not GNOME
follow-up: 11 comment:9 by , 14 months ago
I also tried with A26 on a Fedora 37 VM and could not reproduce. I tried the system scaling to 200% but not change, maybe it's fractional scaling? I don't know how to enable that in Fedora though.
comment:12 by , 13 months ago
Sorry if that wasn't clear, I use the default which is GNOME + Wayland.
comment:13 by , 13 months ago
Patch: | → Phab:D4974 |
---|
I was able to reproduce it on Ubuntu 22.04, Ubuntu 22.10, Fedora 37 and Fedora 38 Beta with enabled Wayland SDL backend via SDL_VIDEODRIVER=wayland
. It's reproducible even for an SDL sample, calling SDL_SetWindowGrab(window, SDL_TRUE)
on a start makes it even more noticeable.
I think (I haven't written a pure Wayland sample yet) the problem is on the GNOME side (mutter). Particularly the confinement region is outdated for some reason until some event happened (for example window activation, it's enough to switch to another window and back without moving/resizing).
I've superficially checked SDL code and it seems it doesn't specify the confinement region if we don't call SDL_SetWindowMouseRect
(nullptr for confine_pointer
region). So the WM should calculate the region by itself which doesn't happen properly.
Also the bug might be not reproducible on a VM (at least with default settings). As the mouse capturing might be denied by its host.
Refs #545
comment:14 by , 13 months ago
Owner: | set to |
---|
comment:15 by , 13 months ago
Opened a ticket for mutter (GNOME): https://gitlab.gnome.org/GNOME/mutter/-/issues/2740
comment:17 by , 13 months ago
Milestone: | Alpha 27 → Alpha 28 |
---|---|
Priority: | Release Blocker → Should Have |
Do not close the ticket until the GNOME one is resolved.
comment:18 by , 13 months ago
Summary: | Can't move cursor through the entire screen in linux fedora dnf installation → Can't move cursor through the entire screen on Linux with GNOME |
---|
comment:19 by , 13 months ago
Summary: | Can't move cursor through the entire screen on Linux with GNOME → Can't move cursor through the entire screen on Linux with GNOME and Wayland |
---|
Available area for cursor