hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
17.99k stars 754 forks source link

Game: cursor warps to center when it's near screen edges #6078

Open krims0n32 opened 1 month ago

krims0n32 commented 1 month ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch makepkg at commit 94c20a186372aace78b188842848b873eb3ebbd7 (primary-selection: move to hyprland impl). Date: Wed May 15 00:13:35 2024 Tag: v0.40.0-87-g94c20a18, commits: 4693 flags: (if any) System Information: System name: Linux Node name: nyx Release: 6.8.9-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Thu, 02 May 2024 17:49:46 +0000 GPU information: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] [1002:744c] (rev c8) (prog-if 00 [VGA controller]) 19:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c9) (prog-if 00 [VGA controller]) os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: ```

Bug or Regression?

Bug

Description

Game is Star Citizen, running in Wine. Fullscreen mode or borderless window.

When you move the mouse to the screen edges, the cursor is being warped to the center of the screen, except for the upper edge (I have two monitors above the one I game on). See video.

I'm trying to pinpoint if this is a game/wine issue or a Hyprland thing. It is affected by Hyprlands mouse acceleration setting, when enabled (default settings) the issue happens even before hitting the screen edges. With acceleration disabled you get the behaviour in the video. It only happens when using "interaction mode", it doesn't happen in the games' options menu for example.

I've been trying various Hyprland options, no_warps and off_window_axis_events have no effect.

Maybe this is related to #6035 ?

How to reproduce

Let me know what I can do to debug this issue :)

Crash reports, logs, images, videos

sc-cursor-warp.webm

ssvx commented 1 month ago

+1

I need at least these to get the cursor in SC not rubberbanding or jumping "on click/scroll mouse inputs":

sensitivity = 0 accel_profile = flat

While that fixes the warp issues it leaves me with broken hover features and non-selectable/-clickable ui elements. In the center of the screen there seems to be a box in which dragging items behaves differently (drag ghost outline visible inside box, not outside). There's all kinds of funky stuff and within a rootful and -host-grab Xwayland session i noticed that toggling grab (ctrl+shift) switches between the two observed modes of broken (click-jumpy-cursor vs edge-pan-jump and no-hover).

krims0n32 commented 1 month ago

Here are the relevant hyperlogs of opening the interaction menu, then hitting the screen edge (surface gets removed, cursor warps to center).

[LOG] cursorImage request: surface 597a964ecf90
[LOG] Registered signal for owner 59790cdf57e0: 597a964ed2a8 -> 59790cdf5860 (owner: CWLSurface)
[LOG] Registered signal for owner 59790cdf57e0: 597a964ed268 -> 59790cdf58c8 (owner: CWLSurface)
[LOG] CWLSurface 59790cdf57e0 called init()
[LOG] Registered signal for owner 0: 597a964ed268 -> 59790c2900d8 (owner: CPointerManager)
[LOG] Registered signal for owner 597a9855b680: 597a98558028 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a98565218 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9855d378 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a98558028 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a98565218 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9855d378 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] cursorImage request: surface 0
[LOG] Callback 59790c290100 -> 59790c2900f8, CPointerManager removed.
[LOG] Callback 59790cdf5888 -> 59790cdf5880, CWLSurface removed.
[LOG] Callback 59790cdf58f0 -> 59790cdf58e8, CWLSurface removed.
[LOG] CWLSurface 59790cdf57e0 called destroy()
[LOG] cursorImage request: surface 597a964ecf90
[LOG] Registered signal for owner 59790cdf57e0: 597a964ed2a8 -> 59790cdf5860 (owner: CWLSurface)
[LOG] Registered signal for owner 59790cdf57e0: 597a964ed268 -> 59790cdf58c8 (owner: CWLSurface)
[LOG] CWLSurface 59790cdf57e0 called init()
[LOG] Registered signal for owner 0: 597a964ed268 -> 59790c2900d8 (owner: CPointerManager)
[LOG] Registered signal for owner 597a9855b680: 597a9636cc98 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9855d218 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9658fe68 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9608edc8 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9855d218 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9658fe68 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
Rcomian commented 1 month ago

I'm also having trouble in hyprland with star citizen. for me it's warping to the bottom right corner whenever i interact with a 2D design element. so inventory management is a pain, as is selecting lift destinations, as is vehicle management etc.

it isn't a problem on other window managers like plasma. sadly running Xwayland in full screen with a different window manager causes other unrelated issues, like not responding until the mouse hits the edges in fps mode or not capturing the mouse at all in fps mode so that it runs away onto my second screen.

(actually scratch that, plasma wayland is waaaay worse, pinning the mouse entirely in the bottom right, X11 window managers are better).