mirror of
https://github.com/hyprwm/Hyprland
synced 2025-01-10 10:09:49 +01:00
socket2: add focusedmonv2 event (#8921)
* socket2: add focusedmonv2 event * socket2: remove workspace name from focusedmonv2
This commit is contained in:
parent
b0cd9972e8
commit
f69e72eca1
1 changed files with 6 additions and 1 deletions
|
@ -2588,7 +2588,12 @@ void CCompositor::setActiveMonitor(PHLMONITOR pMonitor) {
|
|||
|
||||
const auto PWORKSPACE = pMonitor->activeWorkspace;
|
||||
|
||||
g_pEventManager->postEvent(SHyprIPCEvent{"focusedmon", pMonitor->szName + "," + (PWORKSPACE ? PWORKSPACE->m_szName : "?")});
|
||||
const auto WORKSPACE_ID = PWORKSPACE ? std::to_string(PWORKSPACE->m_iID) : std::to_string(WORKSPACE_INVALID);
|
||||
const auto WORKSPACE_NAME = PWORKSPACE ? PWORKSPACE->m_szName : "?";
|
||||
|
||||
g_pEventManager->postEvent(SHyprIPCEvent{"focusedmon", pMonitor->szName + "," + WORKSPACE_NAME});
|
||||
g_pEventManager->postEvent(SHyprIPCEvent{"focusedmonv2", pMonitor->szName + "," + WORKSPACE_ID});
|
||||
|
||||
EMIT_HOOK_EVENT("focusedMon", pMonitor);
|
||||
m_pLastMonitor = pMonitor->self;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue