diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-03-13 15:38:18 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-03-13 15:38:24 +0000 |
| commit | 3e67ee0f5f66c74c0a0bd4f797361fd100c2e2d2 (patch) | |
| tree | 3b247c9e43f141cc9261803fe0712b53a54af9d8 /src/events/Windows.cpp | |
| parent | 893c55217b15cf0e5fe7eb3eb2d88183df410b9a (diff) | |
events: ignore setTitle when title didn't change
Diffstat (limited to 'src/events/Windows.cpp')
| -rw-r--r-- | src/events/Windows.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 2da54583..1e547efc 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -901,7 +901,12 @@ void Events::listener_setTitleWindow(void* owner, void* data) { if (!g_pCompositor->windowValidMapped(PWINDOW)) return; - PWINDOW->m_szTitle = g_pXWaylandManager->getTitle(PWINDOW); + const auto NEWTITLE = g_pXWaylandManager->getTitle(PWINDOW); + + if (NEWTITLE == PWINDOW->m_szTitle) + return; + + PWINDOW->m_szTitle = NEWTITLE; g_pEventManager->postEvent(SHyprIPCEvent{"windowtitle", std::format("{:x}", (uintptr_t)PWINDOW)}); EMIT_HOOK_EVENT("windowTitle", PWINDOW); |
