Bug 469008

Summary: [Tablet/Wacom - Wayland] While over a window the tablet cursor can move 1px outside of the screen (causing problem with tiling)
Product: [Plasma] kwin Reporter: dmatteo002
Component: inputAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: dmatteo002, kde
Priority: NOR    
Version: 5.27.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 6.0
Attachments: libinput debug-events logs

Description dmatteo002 2023-04-26 14:12:39 UTC
Created attachment 158449 [details]
libinput debug-events logs

SUMMARY
While over a window it is possible to move the tablet cursor (in wayland) ~1px outside the screen, but only in the right and bottom corner. 
The actual bug is very minor but it cause problem with other thing because now the cursor is outside the screen margin. For example while trying to tile, while dragging a window, it is possible to move to much to the right causing the preview of right tiling to disappear, togheter with the actual possibility to tile.



STEPS TO REPRODUCE
1. Connect a tablet
2. Move cursor to right or bottom side 
3. Pass over a window still being at right or bottom side

OBSERVED RESULT
It is fine when there is nothing under the cursor but if there is something under that it is possible to move ~1px more to the right or to the bottom (depending on which border is tried on).

EXPECTED RESULT
The cursor max position should be the same if over a window or not. 


ALTERNATIVE STEPS (EASIER TO SEE)
1. Drag a window to the right border
2. Try to tile and then drag the cursor to the rightmost part

OBSERVED RESULT
Tiling preview disappear and is impossible to tile without moving left with the cursor.

EXPECTED RESULT
The cursor should not be able to move outside the screen and so preview should be able to remain active.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch linux (kernel 6.2.12)
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9 (+ qt6 istalled)

ADDITIONAL INFORMATION
I did try with different tablet (wacom / gaomon) and with different installation and even with a KDE 6 build and I found that this bug is always reproducable at first try.
Comment 1 dmatteo002 2023-04-26 14:13:54 UTC
*** Bug 462968 has been marked as a duplicate of this bug. ***
Comment 2 dmatteo002 2023-04-26 15:23:30 UTC
Found another problem that should raise the Importance: while pressing shift and dragging a window (so to quick tile that i whink was added in 5.27) make the entire desktop (or kwin or wayland I don't know) crash. So I can see a black screen and then it reload the screen without any applications.
Comment 3 David Edmundson 2023-05-04 08:07:18 UTC
WIP:  https://invent.kde.org/plasma/kwin/-/merge_requests/4029