Subject: Re: bug#79032: 30.1; Stylus (Wacom Pen) Support under Wayland

From: Po Lu <[email-masked]>
Date: Sat, 09 Aug 2025 21:07:02 +0800

Eli Zaretskii <[email-masked]> writes:

> Ping! Ping!  Po Lu, please respond.

Right, it appears that my e-mail has returned to normal.

>> > This seems to imply that the stylus doesn't produce mouse-up events in
>> > this case?  Because otherwise, you should have seen <mouse-1> events
>> > as well.
>> > 
>> > Po Lu, any ideas?   Is this a known issue with Wayland?
>> > 
>> > > This behavior makes it impossible to use the stylus for drawing inside
>> > > Emacs, e.g. using artist-mode or el-easydraw
>> > > (https://github.com/misohena/el-easydraw/issues/40).
>> > > 
>> > > This behavior appears to be specific to Wayland, perhaps even to my
>> > > compositor (swaywm). In particular, X (by default) appears to treat the
>> > > stylus like the mouse:
>> > > 
>> > > - xev (running under Xwayland) reports stylus interactions as mouse
>> > >   events, but wev reports stylus interactions as "zwp_tablet_tool_v2"
>> > >   events.
>> > > 
>> > > - If I run Emacs under Xwayland (GDK_BACKEND=X11 emacs -Q), the stylus
>> > >   behaves identically to the mouse.
>> > > 
>> > > Thus, for starters, it would be interesting if other Wayland users,
>> > > using the same or different compositors, observe the same behavior.

Do you observe the same phenomenon in other GTK 3 programs?  I cursorily
grepped for "zwp_tablet_tool_v2" in my copy of GTK 3's source code with
no results, which means whatever support for tablets exists under PGTK
is provided by your Wayland compositor.