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

Sway 1.6 cursor issue in-game: cursor is not updated #6195

Closed
MarcoCount opened this issue Apr 17, 2021 · 7 comments
Closed

Sway 1.6 cursor issue in-game: cursor is not updated #6195

MarcoCount opened this issue Apr 17, 2021 · 7 comments
Labels
bug Not working as intended

Comments

@MarcoCount
Copy link

  • Sway Version:

    • Working on sway 1.5.1. Not working on sway 1.16 (using archlinux)
  • Description:

    • When I open Age of Empires II De, a full-screen game running under steamplay, the cursor is changed to the game's cursor.
      Since sway 1.6, after changing focused window the cursor is sometimes not changed back to the game's cursor and the default cursor is used.
  • Age Of Empires II De changes the cursor during different stages of the game.
    Since sway 1.6, even if I never switch focus, the cursor never changes, and instead the default game cursor is used.
    This is particularly bad when the game presents the "flag cursor" which has its point of application at the bottom (and not on the top).
    The "flag cursor" is not presented, but instead the normal cursor image is shifted up (because the flag image would have been shifted up, because it points to the bottom).
    Game cursor:
    normal_cursor
    Flag cursor before sway 1.6:
    second_cursor

Note: I downgraded only wlroots to 0.12 and sway 1.15 and the issues was not there

  • Debug Log:
    I tried to check in the debug log if anything was being written at all (sway -d -V).
    I noticed that the log had some: 00:00:06.094 [sway/input/cursor.c:865] denying request to set cursor from unfocused client but they were only happening when switching focus.
    Furthermore I went back to sway 1.5 and the same error was printed.
    The only message that was printed while switching between the default cursor and the "flag cursor" mode was: 00:03:15.045 [DEBUG] [xwayland/xwm.c:771] unhandled X11 property 379 (_NET_WM_USER_TIME) for window xyz but the same thing was happening on sway 1.5

  • Configuration File:
    I unfortunately performed the tests with a somewhat custom config.
    I will try to retry with the default config, but the outcome is likely not going to change.
    https://gist.github.com/MarcoCount/65a04c2ec21846474bdc041e4513000f

  • Conclusion:
    Let me know if you would need any other information.
    Thanks a lot in advance.

@MarcoCount MarcoCount added the bug Not working as intended label Apr 17, 2021
@jokeyrhyme
Copy link

jokeyrhyme commented Apr 18, 2021

Experiencing this as well

  • World of Warcraft (via wine) isn't able to change the mouse cursor based on what I'm pointing at, seems stuck on whichever cursor was needed when I switch focus to the window (fullscreen)

  • occasionally, I won't even get the WoW default mouse cursor, but instead get the default sway one

  • at first I thought it was a wayland-versus-Xwayland problem, but I run Chromium in Xwayland and can observe the mouse cursor changing when I mouseover hyperlinks (changes between default pointer arrow and the hand with a pointing finger), so between Firefox (wayland) and Chromium (Xwayland) I think we can rule out that being the difference here

@emersion
Copy link
Member

Your bug report is missing debug logs. Please add a link to the full debug log file.

@MarcoCount
Copy link
Author

MarcoCount commented Apr 18, 2021

Your bug report is missing debug logs. Please add a link to the full debug log file.

Sure, there you are: https://gist.github.com/MarcoCount/c632c144056dc1b749a41a28e904faed
I didn't think it's particularly useful because nothing was written when the cursor should have changed, but you know better than me.

@jokeyrhyme
Copy link

I just set these variables and now cursors are working again:

WLR_DRM_NO_MODIFIERS=1
WLR_NO_HARDWARE_CURSORS=1

See: https://github.com/swaywm/wlroots/blob/master/docs/env_vars.md

I'll try to isolate exactly which one is making the difference, but if I had to guess, it's probably disabling hardware cursors that's done the trick

@melkor217
Copy link

Yup, that's WLR_NO_HARDWARE_CURSORS=1

@varris1
Copy link

varris1 commented Jul 6, 2021

It looks like one of the recent wlroots commits fixed the issue for me. The game I used to test for this bug on my machine before (Factorio) seems to update the mouse cursor just fine now. I think it was swaywm/wlroots#3021

@MarcoCount
Copy link
Author

I can confirm that the issue seem to be solved for me.
I just tested it.
I'm closing the issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

5 participants