https://bugs.kde.org/show_bug.cgi?id=520910

            Bug ID: 520910
           Summary: KWin Wayland/XWayland: visible cursor sprite restores
                    at stale grabbed position after XWarpPointer +
                    XUngrabPointer
    Classification: Plasma
           Product: kwin
      Version First 6.6.4
       Reported In:
          Platform: CachyOS
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: xwayland
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 192780
  --> https://bugs.kde.org/attachment.cgi?id=192780&action=edit
video reproducing the bug

In Minecraft running under XWayland, the actual pointer position is correct,
but KWin restores/renders the visible cursor at a stale position after the
mouse is ungrabbed.

The attached video demonstrates the issue. Each time I open the inventory
(which releases the mouse grab), the cursor should appear centered on the
screen. Instead, the visible cursor is restored to the last grabbed/camera
position.

The problem appears to be 100% reproducible when using demanding shaders with
uncapped FPS. Under these conditions, every inventory open causes the cursor to
appear at the stale pre-ungrab location, even though the underlying pointer
position is correct.

STEPS TO REPRODUCE
  1. Start Plasma Wayland session on KWin 6.5.
  2. Run Minecraft 1.7.10/1.8.9 under XWayland using LWJGL2 (default for old
minecraft).
  3. Enable heavy shaders and unlimited FPS.
  4. Aim/move mouse while Minecraft has an X11 pointer grab.
  5. Open inventory/Pause GUI.
  6. Minecraft/LWJGL calls XWarpPointer to GUI center, then ungrabs pointer.

OBSERVED RESULT
XQueryPointer reports the cursor at GUI center, but KWin displays the visible
cursor at the last grabbed/camera position.

EXPECTED RESULT
Visible cursor appears at GUI center.

SOFTWARE/OS VERSIONS
Operating System: CachyOS Linux 
KDE Plasma Version: 6.6.4
KDE Frameworks Version: 6.26.0
Qt Version: 6.11.0
Kernel Version: 7.0.5-2-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5500U with Radeon Graphics
Memory: 8 GiB of RAM (5.6 GiB usable)
Graphics Processor: AMD Radeon Graphics

ADDITIONAL INFORMATION
  - I cannot reproduce on GNOME Shell Wayland or Plasma X11 Session.
  - LWJGL log shows post-warp and post-ungrab XQueryPointer repeatedly
centered.
  - Extra root-window XWarpPointer also does not fix it.
  - FPS cap to a safe FPS where my gpu can render fine reduces/stops the bug;
heavy shaders/unlimited FPS increases repro rate to 100%.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to