https://bugs.kde.org/show_bug.cgi?id=526831
Bug ID: 526831
Summary: Tablet pen: no up event when pen leaves window while
touching screen. XWayland apps get stuck with button
pressed
Classification: Plasma
Product: kwin
Version First 6.7.5
Reported In:
Platform: Arch Linux
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: input
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
DESCRIPTION
While using an application called OpenToonz which is being operated under
XWayland, that if I press my tablet pen inside the window and drag it outside,
that if I attempt to use my mouse afterwards, I am unable to interact with any
UI elements. My understanding of the issue is that KWin is sending the window
the proximity_out event without a preceding up event. So by effect all mouse
input is treated as a drag until I tap with my pen again.
STEPS TO REPRODUCE
1. Press tablet pen anywhere within an XWayland window
2. Drag the pen outside the window
3. Lift the pen
4. Attempt to interact with said window using your mouse
OBSERVED RESULT
Trace #1: I attempted to trace the KWrite application to see what was going on.
I saw that the window gets the "down()" event, then the "proximity_out()"
event, and the "up()" event never appears.
```
zwp_tablet_tool_v2#4278190084.proximity_in(200651, zwp_tablet_v2#4278190080,
wl_surface#46)
zwp_tablet_tool_v2#4278190084.down(200652)
zwp_tablet_tool_v2#4278190084.proximity_out()
```
Trace #2: To try to get a baseline, I observed the events that occurred when
putting my pen inside the window, making a stroke, and then lifting the pen
while it's still inside the window
```
zwp_tablet_tool_v2#4278190084.proximity_in(200654, zwp_tablet_v2#4278190080,
wl_surface#46)
zwp_tablet_tool_v2#4278190084.down(200655)
zwp_tablet_tool_v2#4278190084.up()
zwp_tablet_tool_v2#4278190084.proximity_out()
```
With an XWayland window, XWayland keeps the button pressed afterwards.
XIQueryDevice reports button 1 down on both "xwayland-tablet stylus" and
"Virtual core pointer" until the next time I tap the tablet pen.
EXPECTED RESULT
According to the tablet-v2 protocol
[https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/stable/tablet/tablet-v2.xml]:
```
If the tablet tool moves out of the input region while in contact
with the surface of the tablet and the compositor does not have an
ongoing grab on the surface, the client owning said region will
receive a zwp_tablet_v2.up event, followed by a zwp_tablet_v2.proximity_out
event and a zwp_tablet_v2.frame event
```
which does not match what i observed
SOFTWARE/OS VERSIONS
Operating System: CachyOS Linux (kernel 7.2.6-1-cachyos)
KDE Plasma Version: 6.7.5
KDE Frameworks Version: 6.30.0
Qt Version: 6.11.2
Xwayland: 24.1.13
Graphics Platform: Wayland
ADDITIONAL INFORMATION
--
You are receiving this mail because:
You are watching all bug changes.