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) diff --git a/src/desktop/Window.hpp b/src/desktop/Window.hpp index 40e5db49..ed79c896 100644 --- a/src/desktop/Window.hpp +++ b/src/desktop/Window.hpp @@ -422,7 +422,7 @@ class CWindow { bool visibleOnMonitor(CMonitor* pMonitor); int workspaceID(); bool onSpecialWorkspace(); - void activate(); + void activate(bool force = false); int getRealBorderSize(); void updateSpecialRenderData(); diff --git a/src/protocols/ForeignToplevelWlr.cpp b/src/protocols/ForeignToplevelWlr.cpp index 38d7a38d..1762ad2a 100644 --- a/src/protocols/ForeignToplevelWlr.cpp +++ b/src/protocols/ForeignToplevelWlr.cpp @@ -17,10 +17,9 @@ CForeignToplevelHandleWlr::CForeignToplevelHandleWlr(SPm_eSuppressedEvents & SUPPRESS_ACTIVATE) - return; - - PWINDOW->activate(); + // these requests bypass the config'd stuff cuz it's usually like + // window switchers and shit + PWINDOW->activate(true); }); resource->setSetFullscreen([this](CZwlrForeignToplevelHandleV1* p, wl_resource* output) {