From 637d70b2c58ad27b07703a6813642c15dee3c826 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan <fourdan@xfce.org> Date: Sat, 23 May 2020 11:11:38 +0200 Subject: [PATCH] focus: Ping client on focus To make sure that they are still alive and detect hung clients. Signed-off-by: Olivier Fourdan <fourdan@xfce.org> --- src/focus.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/focus.c b/src/focus.c index eb5b1b9fe..23828fd2c 100644 --- a/src/focus.c +++ b/src/focus.c @@ -622,6 +622,12 @@ clientSetFocus (ScreenInfo *screen_info, Client *c, guint32 timestamp, unsigned pending_focus = c; sendClientMessage (screen_info, c->window, WM_TAKE_FOCUS, timestamp); } + + /* Send client ping if supported to detect stalled apps */ + if (timestamp != CurrentTime) + { + clientSendNetWMPing (c, timestamp); + } } else { -- GitLab