From 41f5f67f6c8675ec48d893007ca93f8bf6c0049a Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 24 Apr 2025 20:37:49 -0400 Subject: [PATCH] window: Fix order of urgency flag and event emission (#10163) --- src/desktop/Window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index 5472b4446..4843c4911 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -1397,11 +1397,11 @@ void CWindow::activate(bool force) { static auto PFOCUSONACTIVATE = CConfigValue("misc:focus_on_activate"); + m_bIsUrgent = true; + g_pEventManager->postEvent(SHyprIPCEvent{"urgent", std::format("{:x}", (uintptr_t)this)}); EMIT_HOOK_EVENT("urgent", m_pSelf.lock()); - m_bIsUrgent = true; - if (!force && (!m_sWindowData.focusOnActivate.valueOr(*PFOCUSONACTIVATE) || (m_eSuppressedEvents & SUPPRESS_ACTIVATE_FOCUSONLY) || (m_eSuppressedEvents & SUPPRESS_ACTIVATE))) return;