Buggy Xwayland windows when used with graphics tablet

Since GNOME 47 I’ve been experiencing a bug, where dragging a widget in any Xwayland window that spawns a popup, with the graphics tablet, causes the window to freeze.

To reproduce:

  1. Enter GNOME Wayland session.
  2. Launch Krita or GIMP (xwayland) and open a canvas.
  3. Use the tablet stylus to drag a layer.

Both Krita and the popup will freeze. You can no longer interact anything with the tablet and the popup also gets stuck on the screen in the Overview or outside of Krita.

The only way to fix it is to use the mouse to click on the window, cancel the drag (e.g. press Esc), then use the stylus to tap on the window to regain focus.

This bug is reproducible on any Xwayland window as long as a popup is spawned on drag. Examples being Opentoonz, Drawpile, Firefox on xwayland, etc

I’ve found a relevant Mutter bug report but there hasn’t been any updates on it:

Similar discussion on Krita’s forums: