From d3bd4c2a0a2fe82f03bb6c96ca4dc820683bf769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Thu, 26 Sep 2019 13:11:52 +0200 Subject: [PATCH] Run focus handling when selecting a focused transient window Selecting an already focused window with a transient would not trigger a proper focus signal. --- navigator.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/navigator.js b/navigator.js index 749c9e7..6b37e28 100644 --- a/navigator.js +++ b/navigator.js @@ -287,7 +287,9 @@ var Navigator = class Navigator { (!force || !(display.focus_window && display.focus_window.is_on_all_workspaces())) ) { - if (selected !== display.focus_window) { + let hasFocus = selected.has_focus(); + selected.foreach_transient(mw => hasFocus = mw.has_focus() || hasFocus); + if (!hasFocus) { Main.activateWindow(selected); } else { // Typically on cancel - the `focus` signal won't run