CCompositor::moveWindowToWorkspace -> CWindow::moveToWorkspace

This commit is contained in:
Darksome
2022-08-21 18:01:26 +03:00
parent 0f25f3aee3
commit f7f3446882
6 changed files with 15 additions and 18 deletions

View File

@@ -205,4 +205,15 @@ void CWindow::updateSurfaceOutputs() {
wlr_surface_for_each_surface(g_pXWaylandManager->getWindowSurface(this), sendLeaveIter, PLASTMONITOR->output);
wlr_surface_for_each_surface(g_pXWaylandManager->getWindowSurface(this), sendEnterIter, PNEWMONITOR->output);
}
void CWindow::moveToWorkspace(int workspaceID) {
if (m_iWorkspaceID != workspaceID) {
m_iWorkspaceID = workspaceID;
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_iWorkspaceID);
if (PWORKSPACE) {
g_pEventManager->postEvent(SHyprIPCEvent{"movewindow", getFormat("%x,%s", this, PWORKSPACE->m_szName.c_str())});
}
}
}