unresponsive process window triggers too often
Olivier Fourdan
fourdan at gmail.com
Wed May 27 17:19:33 CEST 2020
On Wed, 27 May 2020 at 16:08, Olaf Hering <olaf at aepfle.de> wrote:
>
> > But if the client triggers the non-responsive dialog that's because it
> > claims to support _NET_WM_PING but does not reply to the _NET_WM_PING
> > message in timely manner, which would be a bug in the client.
>
> How does a client claim support for it?
>
Just by listing NET_WM_PINGin the list of supported protocols.
https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm45513934498688
> There are no traces of that string in the sources, xprop does say it is
> enabled.
> WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS,
> _NET_WM_PING, _NET_WM_SYNC_REQUEST
>
> Is there a gtk function to enable or disable it?
> Google did not reveal useful results for "_NET_WM_PING" AND "gtk".
A GTK based client does not need to claim anything, GTK itself supports it.
https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gdk/x11/gdkwindow-x11.c#L793
The toolkit itself (i.e. GTK) takes care of replying th ping request
automatically:
https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gdk/x11/gdkdisplay-x11.c#L1482
But the GTK main event loop needs to be running for this to work of course,
the client needs to make sure the mainloop is called even when it's busy
with other stuff:
https://developer.gnome.org/gtk3/stable/gtk3-General.html#gtk-events-pending
So if one just spawns some process or computation and just wait for
completion without calling the GTK event loop in the mean time, the ping
won't be replied and the WM will assume the client is hung (which is true,
in fact, as it does not reply).
Cheers
Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/xfce4-dev/attachments/20200527/565b874f/attachment.html>
More information about the Xfce4-dev
mailing list