wmww / gtk-layer-shell

A library to create panels and other desktop components for Wayland using the Layer Shell protocol
GNU General Public License v3.0
313 stars 15 forks source link

xdg_wm_base::ping not handled? (normal xdg_toplevels appear unresponsive on KWin) #173

Closed dkondor closed 5 months ago

dkondor commented 5 months ago

I'm seeing an issue if I create multiple GtkWindows, some gtk-layer-shell, some regular toplevel. The regular toplevels are characterized by KWin as "unresponsive".

I'm attaching a minimal example in Python: create_toplevel.py.txt -- to reproduce the issue, just click on the 'Create Toplevel' button, and notice that the newly created window will be identified as "Not Responding" and greyed out after some time. Note that the app does not actually become unresponsive (you can still click the button in the new window).

Running with WAYLAND_DEBUG, I see that no xdg_wm_base::ping events are delivered, so I was wondering if the xdg_wm_base listener is not connected for some reason? This sounds strange though since I assume that to be handled somewhere in core GTK.

Tested on KWin 5.24.7 (Ubuntu 22.04, running with Plasma shell). Cannot see it on any other compositor that I have on my computer (Wayfire, Cosmic, Labwc), but I think the reason is that they do not implement the ping mechanism at all (I see on ping messages sent by them in other cases, while KWin normally sends one ping whenever a toplevel is focused). Also, no issue if I don't use GTK, but create layer-shell and xdg surfaces directly.