window: Fix order of urgency flag and event emission (#10163)

This commit is contained in:
Jason 2025-04-24 20:37:49 -04:00 committed by GitHub
parent 02d7badd15
commit 41f5f67f6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1397,11 +1397,11 @@ void CWindow::activate(bool force) {
static auto PFOCUSONACTIVATE = CConfigValue<Hyprlang::INT>("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;