[gdk-3] Pen looses pressure axis, when used at the same time with any other input device
Steps to reproduce
Use an application, which allows drawing with a Pen/Touchscreen like xournalpp
- Add debugging information to the Event Handlers
- start drawing with the pen
- start to use the touchscreen with your fingers
Current behavior
I am not sure, if this is a gdk or libinput issue:
As soon a Touchpad and a Pen is used simultaneous, the GdkEventMotion
of a Pen Device with GDK_SOURCE_PEN
looses it's GDK_AXIS_PRESSURE
.
auto found = gdk_event_get_axis(sourceEvent, GDK_AXIS_PRESSURE, &targetEvent.pressure);
will return 0;
Event type: GDK_MOTION_NOTIFY
Source device: GDK_SOURCE_PEN
Expected outcome
That a motion event with the source of GDK_SOURCE_PEN
never looses it's GDK_AXIS_PRESSURE
.
Version informationOS:
Several input devices (mine is a Wacom ISDv4 EC Pen stylus, ELAN Touchscreen)
Linux Mint 21.2 / Ubuntu 22.04 (possible others)
libinput: v.1.20
libgtk-3-0: 3.24.33-1ubuntu2
Additional information
Adding this to the event handling will crash any app, when both, touchscreen and Pen is used.
auto found = gdk_event_get_axis(sourceEvent, GDK_AXIS_PRESSURE, &targetEvent.pressure);
if(!found && INPUT_DEVICE_PEN == targetEvent.deviceClass) {
g_error("^kill^");
std::abort();
}
Edited by Fabian Keßler