diff options
| author | Darksome <dev@darkso.me> | 2022-08-21 18:01:26 +0300 |
|---|---|---|
| committer | Darksome <dev@darkso.me> | 2022-08-21 18:01:26 +0300 |
| commit | f7f34468823b15e7a6d75710df0bff274a8e1981 (patch) | |
| tree | 3fde1f547587b0f553ceb269841351b32926de35 /src/Window.cpp | |
| parent | 0f25f3aee36c4f312a3fb36a7abb63fe78f5254e (diff) | |
CCompositor::moveWindowToWorkspace -> CWindow::moveToWorkspace
Diffstat (limited to 'src/Window.cpp')
| -rw-r--r-- | src/Window.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Window.cpp b/src/Window.cpp index 926d2da6..e9af0349 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -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())}); + } + } }
\ No newline at end of file |
