workspace set active

This commit is contained in:
vaxerski
2022-05-25 10:25:36 +02:00
parent c8425926c9
commit 0ae6563fef
6 changed files with 15 additions and 7 deletions

View File

@@ -87,11 +87,12 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
g_pCompositor->m_pLastMonitor = PMONITOR;
// set active workspace and deactivate all other in wlr
g_pCompositor->deactivateAllWLRWorkspaces(g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace)->m_pWlrHandle);
wlr_ext_workspace_handle_v1_set_active(g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace)->m_pWlrHandle, true);
const auto ACTIVEWORKSPACE = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
g_pCompositor->deactivateAllWLRWorkspaces(ACTIVEWORKSPACE->m_pWlrHandle);
ACTIVEWORKSPACE->setActive(true);
// event
g_pEventManager->postEvent(SHyprIPCEvent("activemon", PMONITOR->szName + "," + g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace)->m_szName));
g_pEventManager->postEvent(SHyprIPCEvent("activemon", PMONITOR->szName + "," + ACTIVEWORKSPACE->m_szName));
}
Vector2D surfaceCoords;