From d053ccfb184b8ee1fb30ab928c149e79da44888e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Tue, 15 Oct 2019 18:29:27 +0200 Subject: [PATCH] window: Check window responsiveness on every window focus Increase the number of checks whether a window is still responsive and ping windows on every call to `meta_window_focus()` instead of `meta_window_activate_full()`. This ensures the window is also pinged in case normal interaction like clicks on the window happen and a close dialog will eventually get shown. Related https://gitlab.gnome.org/GNOME/mutter/issues/395 https://gitlab.gnome.org/GNOME/mutter/merge_requests/891 --- src/core/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/window.c b/src/core/window.c index d5c92102b..d42a373c7 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -3750,8 +3750,6 @@ meta_window_activate_full (MetaWindow *window, meta_window_focus (window, timestamp); else meta_workspace_activate_with_focus (window->workspace, window, timestamp); - - meta_window_check_alive (window, timestamp); } /* This function exists since most of the functionality in window_activate @@ -4772,6 +4770,8 @@ meta_window_focus (MetaWindow *window, return; } + meta_window_check_alive (window, timestamp); + META_WINDOW_GET_CLASS (window)->focus (window, timestamp); if (window->display->event_route == META_EVENT_ROUTE_NORMAL)