Using a Wacom pen in Overview or Applications causes undefined behaviour under Wayland
Under Wayland, using a Wacom pen to select a window in the overview or an application icon in the applications menu does not allow to "ungrab" it, resulting in (what looks a lot like) undefined behaviour in various (most?) UI components (both in the shell itself and in applications).
It is in general not possible to save data and gracefully close open applications, leading to potential loss of data.
In many cases, the only way to go back to a working state is to use SysRq+R+E to kill GDM (and let it restart automatically).
- Product: gnome-shell (Wayland)
- Version: 3.28.2 (I will try to test it using nightly as soon as I can get it to run...)
- Distribution: Fedora release 28 (Twenty Eight)
Steps to reproduce & observed behaviour:
Start a Gnome Wayland session.
Using the overview:
- Open at least one window.
- Open the overview (e.g. by clicking on "Activities").
- Select a window by placing the Wacom pen on top of it and applying some pressure until the window is selected (i.e. the window disappears from the overview and a miniature image appears near the tip of the pen).
- Try to do anything with the shell (click icons, open applications, play with menus, ...) and observe its behaviour. Many UI components will stop responding to any input.
- Be prepared to SysRq+R+E to restart GDM.
Using the applications menu:
- Open the applications menu (e.g. using Meta+A).
- Try to launch an application by selecting it with the pen. A miniature image of the application icon will appear, similar to what would happen when trying to drag & drop the icon using the mouse or the touchscreen. But here the image remains stuck on top of the original icon and cannot be dropped.
- Same as 4-5 above.
- Identical to the Xorg behaviour.
- Releasing the window by removing the pen tip from the screen drops the window, which returns to its place in the overview.
- Clicking on an application launcher using the pen launches the application.
It is possible to drop the window / icon by doing a mouse click immediately after selecting it. Interacting with any other UI component may cause UB and prevent using the mouse to drop the window / icon later. Moreover, this workaround may not be available on tablets, or requires rotating the keyboard if using a 2-in-1 laptop.
Some UB may persist after restarting the session using SysRq+R+E. (e.g. the "Gnome on Xorg" entry had disappeared for me, the cursor was back to 1x scaling (i.e tiny) on my hidpi screen, and the Meta key initially did not bring the overview menu). This does not seem deterministic.
It seems that the shell reacts to "TABLET_TOOL_TIP down" events but not "TABLET_TOOL_TIP up" ones (in libinput terminology).
Moreover, the small displacement of the cursor which is typical when the pen tip makes contact with the screen seems to make the shell think I am trying to initiate a drag & drop. This might be caused by an upstream (libinput?) bug and affects other aspects of the shell (e.g. trying to close a window using the pen on Wayland often moves the window instead). This does not happen in Xorg.
Finally, I would be happy to provide you with further information to track down this bug, but I may need some guidance from you regarding which information / logs to provide.