Bug 500647 - Mouse sometimes snaps back in Blender when rotating view
Summary: Mouse sometimes snaps back in Blender when rotating view
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: input (other bugs)
Version First Reported In: 6.3.0
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2025-02-24 02:01 UTC by koczogh.b
Modified: 2025-02-25 15:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description koczogh.b 2025-02-24 02:01:23 UTC
SUMMARY
The mouse pointer sometimes snaps backwards when rotating the camera in Blender using the middle mouse button.

The issue only seems to occur if the mouse is still moving when the middle mouse button is released. If the mouse is stopped before the button is released, the cursor doesn't snap back. Note that it doesn't always snap back to its original location, but rather it appears to be going in a straight line *towards* the original location. It sometimes falls short, or goes past that point.

STEPS TO REPRODUCE
1. Open Blender 4.3.2
2. Click and hold middle mouse button in the viewport
3. Drag mouse to rotate the camera
4. While dragging the mouse, let go of the middle mouse button

OBSERVED RESULT
The mouse cursor snaps back to the location, or near to the location it was when the middle mouse button was pressed, instead of staying where the cursor was when the button was released.

EXPECTED RESULT
The mouse cursor should stay where it was when the middle mouse button was released.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian Sid
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.11.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
I'm not exactly sure what triggers this bug. In one Blender session I was able to reproduce it nearly every time using the above method. In other sessions it may take 30-40 attempts to get it to snap back once. The direction the mouse is moving doesn't appear to be a factor. Blender is running in a native Wayland window.
Comment 1 Zamundaaa 2025-02-25 15:17:17 UTC
Can confirm, but looking at the Wayland debug output, this is definitely a bug in Blender. While moving the mouse with middle click, it constantly does
> [3731982.216] {Default Queue}  -> zwp_pointer_constraints_v1#12.lock_pointer(new id zwp_locked_pointer_v1#56, wl_surface#31, wl_pointer#21, nil, 2)
> [3731983.528] {Default Queue} discarded zwp_locked_pointer_v1#56.locked()
> [3732418.984] {Default Queue}  -> zwp_locked_pointer_v1#56.set_cursor_position_hint(400.00000000, 363.00000000)
> [3732418.988] {Default Queue}  -> zwp_locked_pointer_v1#56.destroy()

Which is completely nonsensical and when it happens to unlock before destroying the locked pointer object, the cursor gets moved to the position hint set by Blender.

So, please report this to Blender.