Bug 461911 - Mouse cursor can go 1 pixel beyond screen edges, which breaks Fitts' law for those screen edges and makes hover-enabled UI elements touching them flicker
Summary: Mouse cursor can go 1 pixel beyond screen edges, which breaks Fitts' law for ...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.26.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
: 463090 464809 464889 465929 466081 466091 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-11-16 16:07 UTC by [object Object]
Modified: 2023-02-27 21:07 UTC (History)
12 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description [object Object] 2022-11-16 16:07:57 UTC
SUMMARY
The mouse cursor seems to be able to go 1 pixel off the screen on the right.
Seems to happen in all windows, but only on the right side. You can see the mouse cursor jittering back and forth by one pixel if you constantly move the mouse to the right

I forgot what release this has been an issue since (I think 5.26..? but I forgot to make a bug report until now). It was partially fixed at some point, in the past even the window close button in the top right wouldn't get selected if you moved the cursor to the very top right, but only that specific button got fixed. You can still see the cursor jittering there, although the button stays selected.

STEPS TO REPRODUCE
1. Move your mouse all the way to the right when, for example, a webpage is open with a scrollbar in firefox

OBSERVED RESULT
You can see the mouse cursor jittering back and forth (seems to be going 1 pixel off-screen) and the scrollbar rapidly changes between selected an un-selected

EXPECTED RESULT
The scrollbar/anything else that is on the edge of the screen is selected

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-11-16 18:07:57 UTC
Probably related to the fractional scale work for Plasma 5.26.

Wayland or X11 or both?

Are you using any scaling?
Comment 2 [object Object] 2022-11-18 00:10:32 UTC
I'm on wayland, and I am using fractional scaling at 150%
Comment 3 Nate Graham 2022-11-18 15:11:21 UTC
Thanks.
Comment 4 Zamundaaa 2023-01-23 13:52:15 UTC
Can reproduce. With a scale of 100% it works correctly at least most of the time, but with 150% the cursor jitter is causing problems
Comment 5 Zamundaaa 2023-01-25 16:23:25 UTC
*** Bug 464809 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2023-01-27 19:40:35 UTC
*** Bug 464889 has been marked as a duplicate of this bug. ***
Comment 7 veggero 2023-01-27 20:11:29 UTC
Can reproduce reliably on Wayland, 100% scaling
Comment 8 Nate Graham 2023-01-27 20:23:00 UTC
Yeah same here with 200% scale.
Comment 9 [object Object] 2023-01-27 20:50:08 UTC
Yeah, testing again on a monitor with 200% scaling and it still happens
Comment 10 Alessandro Astone 2023-02-18 23:19:43 UTC
Can reproduce on Wayland with default 100% scaling. It happens on the right and bottom edges.
Plasma 5.27.0
Comment 11 Patrick Silva 2023-02-19 15:38:50 UTC
*** Bug 466091 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2023-02-21 21:17:44 UTC
*** Bug 465979 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2023-02-21 21:18:07 UTC
*** Bug 465929 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2023-02-22 00:08:57 UTC
*** Bug 466081 has been marked as a duplicate of this bug. ***
Comment 15 ratijas 2023-02-22 13:26:59 UTC
…and here I was blaming Sublime Text for flickering its files list view while moving mouse cursor along left edge of the screen, heh


X11, 100% scaling.
Comment 16 Bug Janitor Service 2023-02-22 15:39:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3664
Comment 17 Vlad Zahorodnii 2023-02-22 19:01:35 UTC
Git commit 520fa3042a9877379870af7b300fab7c669d7e7e by Vlad Zahorodnii, on behalf of Xaver Hugl.
Committed on 22/02/2023 at 19:01.
Pushed by vladz into branch 'master'.

pointer input: always confine pointer to screens

Checking if the pointer needs to be confined before doing `std::clamp` on
the position is useless and causes problems. With this change, the pointer
will always be confined to exactly the screen, without any fractional offsets.

M  +2    -2    autotests/integration/pointer_input.cpp
M  +2    -9    src/pointer_input.cpp

https://invent.kde.org/plasma/kwin/commit/520fa3042a9877379870af7b300fab7c669d7e7e
Comment 18 Vlad Zahorodnii 2023-02-22 21:23:16 UTC
Git commit 5abb038a3c4e2a36a6d5ad3d8d792eaf7bdbcd91 by Vlad Zahorodnii, on behalf of Xaver Hugl.
Committed on 22/02/2023 at 19:02.
Pushed by vladz into branch 'Plasma/5.27'.

pointer input: always confine pointer to screens

Checking if the pointer needs to be confined before doing `std::clamp` on
the position is useless and causes problems. With this change, the pointer
will always be confined to exactly the screen, without any fractional offsets.


(cherry picked from commit 520fa3042a9877379870af7b300fab7c669d7e7e)

M  +2    -2    autotests/integration/pointer_input.cpp
M  +2    -9    src/pointer_input.cpp

https://invent.kde.org/plasma/kwin/commit/5abb038a3c4e2a36a6d5ad3d8d792eaf7bdbcd91
Comment 19 Behzad A 2023-02-27 21:07:37 UTC
*** Bug 463090 has been marked as a duplicate of this bug. ***