From 5e7925eaeba474cfc283e26b7aa3426ec97424f7 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 8 May 2024 01:31:16 +0100 Subject: foreign-toplevel: bypass no activate focus checks ref #5939 those are used by focus switchers so they should bypass stuff like focus_on_activate = false --- src/desktop/Window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/desktop/Window.cpp') diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index 00066b27..e9e50a56 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -1274,7 +1274,7 @@ std::unordered_map CWindow::getEnv() { return results; } -void CWindow::activate() { +void CWindow::activate(bool force) { static auto PFOCUSONACTIVATE = CConfigValue("misc:focus_on_activate"); g_pEventManager->postEvent(SHyprIPCEvent{"urgent", std::format("{:x}", (uintptr_t)this)}); @@ -1282,7 +1282,7 @@ void CWindow::activate() { m_bIsUrgent = true; - if (!*PFOCUSONACTIVATE || (m_eSuppressedEvents & SUPPRESS_ACTIVATE_FOCUSONLY) || (m_eSuppressedEvents & SUPPRESS_ACTIVATE)) + if (!force && (!*PFOCUSONACTIVATE || (m_eSuppressedEvents & SUPPRESS_ACTIVATE_FOCUSONLY) || (m_eSuppressedEvents & SUPPRESS_ACTIVATE))) return; if (m_bIsFloating) -- cgit v1.2.3