Skip to content

Software cursor is unaligned at non-native screen resolutions on Linux #2114

Description

@Rainyan

Build Info

5210510

Description

On Linux, when using the fullscreen video mode, and changing the game resolution to something lower than the OS desktop screen resolution, the software cursor (as default-enabled by #1704) becomes unaligned from the actual mouse position. This is somewhat akin to the cursor offset bug with OGNT, although unsure whether it is related technically.

For the reasoning on defaulting to software cursor to begin with, please see #1704

To Reproduce

Prerequisites

  • Use Linux
    • The bug is probably not distro-specific, but it is verified occurring with:
      • Fedora Linux 44
      • SteamOS 3.8
  • Use Wayland
    • Unsure if this is required but X11 is unverified
  • The desktop environment probably doesn't matter, but the bug is verified on COSMIC 1.6 and KDE Plasma 6.7
  • Bug verified with screens of native resolutions 1920x1080 and 2560x1440
    • Likely the exact resolution doesn't matter either

Steps to repro

  • Launch game with screen native resolution
  • Use the fullscreen video mode*
  • Have the software cursor enabled (as is default-enabled by Use software cursor by default #1704)
  • Lower the in-game resolution via the main menu below the native resolution
  • Inspect the main menu software cursor accuracy when pointing at menu elements

* see additional context below

Expected behavior

  • The software cursor should accurately point to the correct elements after the game resolution change

Actual behavior

  • The software cursor becomes incorrectly offset from the real mouse cursor position after the game resolution change

Operating System

  • Windows
  • Linux

Version/Distro

Fedora and SteamOS (probably distro unrelated)

Additional context and Screenshots

Personally, on my Fedora COSMIC Spin, I can only repro this bug with the "fullscreen" in-game video mode, whereas "windowed" and "borderless" work correctly for me.

* But for Sexu, who originally reported this bug to me, apparently the bug happens for all video modes, "windowed" and "borderless" modes included.

A naive workaround could be disabling the software cursor by default for Linux.

Yet another workaround could be reverting #1704 with the consequences of regressing #1705

Although I guess ideally we should figure out what causes this incorrect cursor offset.

Sexu was also reporting poor/laggy software cursor draw performance, but I'm leaving that one out of scope for this issue.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug ReportBug Reports made through the "Report Issue" interface in GitHub.UI/HUDRelates to the HUD, NeoUI, menus, etc

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions