mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 11:25:59 +01:00
feat: add ipc set title window event (#2419)
* feat: add ipc set title window event * chore: add EMIT_HOOK_EVENT and change event name
This commit is contained in:
parent
67be8d89b5
commit
d7db7040d4
1 changed files with 2 additions and 0 deletions
|
@ -805,6 +805,8 @@ void Events::listener_setTitleWindow(void* owner, void* data) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PWINDOW->m_szTitle = g_pXWaylandManager->getTitle(PWINDOW);
|
PWINDOW->m_szTitle = g_pXWaylandManager->getTitle(PWINDOW);
|
||||||
|
g_pEventManager->postEvent(SHyprIPCEvent{"windowtitle", getFormat("%lx", PWINDOW)});
|
||||||
|
EMIT_HOOK_EVENT("windowTitle", PWINDOW);
|
||||||
|
|
||||||
if (PWINDOW == g_pCompositor->m_pLastWindow) { // if it's the active, let's post an event to update others
|
if (PWINDOW == g_pCompositor->m_pLastWindow) { // if it's the active, let's post an event to update others
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", g_pXWaylandManager->getAppIDClass(PWINDOW) + "," + PWINDOW->m_szTitle});
|
g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", g_pXWaylandManager->getAppIDClass(PWINDOW) + "," + PWINDOW->m_szTitle});
|
||||||
|
|
Loading…
Reference in a new issue