Bug 466688 - [wayland] With a display in the top center, moving the mouse cursor to the top of the screen on one of the side monitors causes the mouse cursor to teleport onto the top center screen
Summary: [wayland] With a display in the top center, moving the mouse cursor to the to...
Status: VERIFIED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.27.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2023-03-01 23:57 UTC by indecisiveautomator
Modified: 2023-04-09 19:14 UTC (History)
6 users (show)

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


Attachments
Teleporting Mouse Cursor (2.00 MB, video/mp4)
2023-03-14 00:37 UTC, Danir Toma
Details

Note You need to log in before you can comment on or make changes to this bug.
Description indecisiveautomator 2023-03-01 23:57:40 UTC
SUMMARY
If you have a display layout with three screens on the bottom and one on the top in the top-center, moving the mouse cursor to the top of one of the left or right side displays causes the mouse cursor to teleport to the bottom of the top-center panel. This only happens if the cursor is approximately more than halfway across the screen in the direction of the top display.

This can be reproduced if you move the cursor to the corner of the display opposite to the top-center display. If you're using a display to the left, move the cursor to the top left of the display and move the cursor across the top of the screen to the right. Once the cursor moves more than approximately halfway across, it will teleport to being in the bottom left corner of the top-center display. For a display to the right, the steps should be mirrored, moving the cursor to the left.

This makes snapping windows maximised on these bottom displays a little bit harder as trying to maximise them without corner-tiling them can be a bit challenging. Without being careful, it can cause the window to corner-tile in the top display.

This did not happen in the Plasma 5.27 beta or Plasma 5.27.0. It first started happening (at least for me) in Plasma 5.27.1, and is still present in Plasma 5.27.2.

STEPS TO REPRODUCE
(Assumes a display layout as described)
1. On one of the bottom side displays (to the left or right of the bottom center display), put cursor in top corner furthest from the top-center display 
2. While keeping the cursor along the top of the display, move it in the direction the top center display (if the cursor was in the top-left corner, move it to the right while keeping it pressed against the top of the display)
3. Cursor will teleport to the corner of the top-center display.

OBSERVED RESULT
Cursor teleports to top-center display as described.


EXPECTED RESULT
Cursor should not teleport to the top-center display, and should behave as it did in Plasma 5.27.0 and below.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kernel 6.2.1
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
- Happens on scaled and non-scaled displays
- Have only tried the Wayland session, have not tried X11
Comment 1 Danir Toma 2023-03-14 00:34:03 UTC
I believe I have the same issue of the cursor teleporting, on Wayland with KDE 5.27.2, with a screen touching to at least ~30% of the top part of the bottom screen.

In my case, I don't have a definitive top-center display, so the mouse cursor just jumps to the top of the current main display. If the bug really appears also depends on how the monitors are arranged, in some constellations (like when the top screen doesn't touch as much of the bottom one) this doesn't happen.
The mouse cursor just teleports back to the top edge of the screen, if you approach the bottom edge of the screen vertically (doesn't happen if you approach it vertically for my constellation. 

I've attached a video "Teleporting Mouse Cursor.mp4" for further demonstration of the issue.
Comment 2 Danir Toma 2023-03-14 00:37:29 UTC
Created attachment 157252 [details]
Teleporting Mouse Cursor

Please don't mind the twisted colors, something's wrong with the recording app "Kooha" with Wayland.
Comment 3 15c730840a66 2023-03-18 08:41:50 UTC
I'm having the same sort of issue. I think it may be related to the fix for Bug 461911, since I stopped having that problem right when I started having this problem.
Comment 4 Tom Boshoven 2023-03-19 19:43:26 UTC
I've been having a similar issue with a simple dual-monitor (1440p, 1080p set up with the 1080p to the right in the vertical middle) setup where if I quickly move my mouse cursor to the bottom of my 1080p monitor, it teleports it left, to the bottom of the 1440p one.
This behavior happens only on the left half of the 1080p monitor.
Comment 5 postix 2023-03-25 20:43:34 UTC
Vlad, your comment https://invent.kde.org/plasma/kwin/-/merge_requests/3883#note_649162 sounds like the MR could resolve this issue, too?
Comment 6 indecisiveautomator 2023-04-08 13:54:22 UTC
Fixed in Plasma 5.27.4! Woohoo!
Comment 7 Danir Toma 2023-04-08 17:29:34 UTC
Can confirm the issue being fixed in KDE-Plasma 5.27.4 (KDE-Frameworks 5.104.0)!
Comment 8 Nate Graham 2023-04-09 19:14:15 UTC
Yay!