Bug 499576 - [Wayland] zwp_tablet_tool_v2.proximity_in() event is sent with the parent surface, not the subsurface where the event actually occurred
Summary: [Wayland] zwp_tablet_tool_v2.proximity_in() event is sent with the parent sur...
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.2.5
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Joshua Goins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-06 04:54 UTC by acct_cl
Modified: 2025-04-03 19:12 UTC (History)
2 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 acct_cl 2025-02-06 04:54:30 UTC
SUMMARY
My project uses subsurfaces attached to the layer-shell overlay (wlr-layer-shell protocol) with an empty input region. When the tablet tool's cursor enters that subsurface, zwp_tablet_tool_v2.proximity_in() is sent with the parent wl_surface (which, in this case, is the overlay with the empty input region). The protocol description for tablet_v2 doesn't mention how focus works with subsurfaces, but since it's a pointer-like device, I expect the same behavior as with wl_pointer

STEPS TO REPRODUCE
1. Create a layer-shell overlay (e.g., wl_surface object ID 21) and attach subsurface (e.g., wl_surface object ID #300).
2. Move the tablet tool's cursor over the subsurface.
3. Check the console output while running with WAYLAND_DEBUG=1 or log the pointer of the received wl_surface.

OBSERVED RESULT
[1869288.535] {Default Queue} zwp_tablet_tool_v2#4278190081.proximity_in(42833, zwp_tablet_v2#4278190080, wl_surface#21)

EXPECTED RESULT
zwp_tablet_tool_v2.proximity_in with wl_surface#300

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.12.10-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 9 5900HX with Radeon Graphics
Memory: 31.2 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2


ADDITIONAL INFORMATION
Project that can be used to demonstrate the issue: https://github.com/CluelessCatBurger/wl_shimeji
Comment 1 Nicolas Fella 2025-02-06 14:31:39 UTC
Needs a fix similar to https://invent.kde.org/plasma/kwin/-/merge_requests/2700