Enter/Leave notifies of same physical device have different GdkInputSource
Steps to reproduce
Use Wayland.
- Move active stylus into widget (or into proximity)
- Move active stylus out of widget (or out of proximity)
Current behavior
Currently, if I move my stylus into the widget area a correct GDK_ENTER_NOTIFY
is generated. You can get vendor_id
and product_id
without any issues and source device type is GDK_SOURCE_PEN
. As the stylus leaves the widget a GDK_LEAVE_NOTIFY
is emitted but this time the source device type is GDK_SOURCE_MOUSE
. This seems to be caused by the device being a GDK_DEVICE_TYPE_MASTER
on leaving whereas on entering it is correctly set to GDK_DEVICE_TYPE_SLAVE
.
Expected outcome
Emit both events as GDK_SOURCE_PEN
.
Version information
GTK 3.24.10 on Arch Linux
The relevant file might be gdkdevice-wayland.c. If sb can help me to setup a debugging environment (preferably in CLion) I might be able to fix this myself.