Skip to content

Commit

Permalink
add activespecialv2 event
Browse files Browse the repository at this point in the history
  • Loading branch information
spikespaz committed Feb 8, 2024
1 parent f984e28 commit 0fefd89
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/helpers/Monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,8 @@ void CMonitor::setSpecialWorkspace(CWorkspace* const pWorkspace) {
// remove special if exists
if (const auto EXISTINGSPECIAL = g_pCompositor->getWorkspaceByID(specialWorkspaceID); EXISTINGSPECIAL) {
EXISTINGSPECIAL->startAnim(false, false);
g_pEventManager->postEvent(SHyprIPCEvent{"activespecial", "," + szName});
g_pEventManager->postEvent(SHyprIPCEvent{"activespecial", std::format(",{}", szName)});
g_pEventManager->postEvent(SHyprIPCEvent{"activespecialv2", std::format(",{},{}", szName, szDescription)});
}
specialWorkspaceID = 0;

Expand Down Expand Up @@ -612,7 +613,8 @@ void CMonitor::setSpecialWorkspace(CWorkspace* const pWorkspace) {
if (PMONITORWORKSPACEOWNER->specialWorkspaceID == pWorkspace->m_iID) {
PMONITORWORKSPACEOWNER->specialWorkspaceID = 0;
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMONITORWORKSPACEOWNER->ID);
g_pEventManager->postEvent(SHyprIPCEvent{"activespecial", "," + PMONITORWORKSPACEOWNER->szName});
g_pEventManager->postEvent(SHyprIPCEvent{"activespecial", std::format(",{}", PMONITORWORKSPACEOWNER->szName)});
g_pEventManager->postEvent(SHyprIPCEvent{"activespecialv2", std::format(",{},{}", PMONITORWORKSPACEOWNER->szName, PMONITORWORKSPACEOWNER->szDescription)});
animate = false;
}

Expand Down Expand Up @@ -652,7 +654,8 @@ void CMonitor::setSpecialWorkspace(CWorkspace* const pWorkspace) {
else
g_pInputManager->refocus();

g_pEventManager->postEvent(SHyprIPCEvent{"activespecial", pWorkspace->m_szName + "," + szName});
g_pEventManager->postEvent(SHyprIPCEvent{"activespecial", std::format("{},{}", pWorkspace->m_szName, szName)});
g_pEventManager->postEvent(SHyprIPCEvent{"activespecialv2", std::format("{},{},{}", pWorkspace->m_szName, szName, szDescription)});

g_pHyprRenderer->damageMonitor(this);

Expand Down

0 comments on commit 0fefd89

Please sign in to comment.