Stylus input not received by newly-spawned window until activated by mouse or touch input
Affected version
- Arch Linux
- Mutter 43.3
- Wayland
Bug summary
Newly spawned windows often don't receive any stylus input until they received mouse or touch input.
Steps to reproduce
I can reproduce this reliably when launching applications via ssh.
- Via ssh: run
WAYLAND_DISPLAY=wayland-0 WAYLAND_DEBUG=1 gtk3-demo
- Use the stylus on the list on the left-hand-side.
What happened
The application does initially not receive any stylus input. Instead it just moves the regular cursor.
What did you expect to happen
The application should immediately receive stylus input and allow selection of entries.
Relevant logs, screenshots, screencasts etc.
Multiple stylus presses and motions that are not received by the application recorded via libinput record --all all-devices_failing.yml
:
all-devices_failing.yml
A successful stylus press activating a list item: all-devices_success.yml
In this video it took multiple attempts in the form of touch input events until stylus input was received by the application. Not until 19-20 s in the first stylus event is received.
End of application startup (from a simpler example than gtk3-demo):
...
[1598366.397] wl_surface@32.enter(wl_output@6)
[1598366.434] wl_callback@40.done(17904805)
[1598374.422] -> wl_surface@32.attach(wl_buffer@37, 0, 0)
[1598374.452] -> wl_surface@32.set_buffer_scale(1)
[1598374.468] -> wl_surface@32.damage(45, 45, 200, 48)
[1598374.482] -> wl_surface@32.damage(95, 174, 100, 39)
[1598374.498] -> xdg_toplevel@34.set_min_size(166, 81)
[1598374.508] -> xdg_toplevel@34.set_max_size(0, 0)
[1598374.522] -> xdg_surface@33.set_window_geometry(45, 45, 200, 248)
[1598374.551] -> wl_surface@32.frame(new id wl_callback@40)
[1598374.563] -> wl_surface@32.commit()
[1598375.201] wl_buffer@37.release()
[1598387.066] wl_display@1.delete_id(40)
[1598387.107] wl_callback@40.done(17904828)
# Only after several attempts to press a button using the stylus I obtain some more output:
[1604510.594] zwp_tablet_seat_v2@26.tool_added(new id zwp_tablet_tool_v2@4278190082)
[1604510.633] zwp_tablet_tool_v2@4278190082.type(320)
[1604510.670] zwp_tablet_tool_v2@4278190082.hardware_serial(0, 0)
[1604510.685] zwp_tablet_tool_v2@4278190082.hardware_id_wacom(0, 0)
[1604510.698] zwp_tablet_tool_v2@4278190082.capability(2)
[1604510.711] zwp_tablet_tool_v2@4278190082.capability(1)
[1604510.723] zwp_tablet_tool_v2@4278190082.done()
[1604510.809] zwp_tablet_tool_v2@4278190082.proximity_in(3728, zwp_tablet_v2@4278190080, wl_surface@32)
[1604510.884] zwp_tablet_tool_v2@4278190082.frame(17910951)
[1604510.918] xdg_wm_base@27.ping(17910951)
[1604510.933] -> xdg_wm_base@27.pong(17910951)
[1604510.965] zwp_tablet_tool_v2@4278190082.motion(139.19921875, 181.64062500)
[1604510.987] zwp_tablet_tool_v2@4278190082.pressure(0)
[1604511.022] zwp_tablet_tool_v2@4278190082.tilt(0.01171875, 0.01171875)
[1604511.037] zwp_tablet_tool_v2@4278190082.frame(17910951)
This can often be fixed by using the touch screen or the mouse on the window before using the stylus:
[1845547.849] xdg_wm_base@27.ping(18151987)
[1845547.905] -> xdg_wm_base@27.pong(18151987)
[1845547.925] wl_touch@30.down(3734, 18151987, wl_surface@32, 0, 96.47656250, 131.72265625)
[1845548.074] wl_touch@30.frame()
[1845589.561] wl_touch@30.up(3735, 18152028, 0)