socket2: Add windowtitlev2 event which includes the window address (#6856)

Fixes #5393
This commit is contained in:
Tim Waterhouse 2024-07-13 07:21:32 -07:00 committed by GitHub
parent a770a88e09
commit 45c4898423
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1343,6 +1343,7 @@ void CWindow::onUpdateMeta() {
if (m_szTitle != NEWTITLE) { if (m_szTitle != NEWTITLE) {
m_szTitle = NEWTITLE; m_szTitle = NEWTITLE;
g_pEventManager->postEvent(SHyprIPCEvent{"windowtitle", std::format("{:x}", (uintptr_t)this)}); g_pEventManager->postEvent(SHyprIPCEvent{"windowtitle", std::format("{:x}", (uintptr_t)this)});
g_pEventManager->postEvent(SHyprIPCEvent{"windowtitlev2", std::format("{:x},{}", (uintptr_t)this, m_szTitle)});
EMIT_HOOK_EVENT("windowTitle", m_pSelf.lock()); EMIT_HOOK_EVENT("windowTitle", m_pSelf.lock());
if (m_pSelf == g_pCompositor->m_pLastWindow) { // if it's the active, let's post an event to update others if (m_pSelf == g_pCompositor->m_pLastWindow) { // if it's the active, let's post an event to update others