diff options
| author | Hilmar Wiegand <me@hwgnd.de> | 2023-04-10 21:07:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-10 20:07:49 +0100 |
| commit | 7b43f9f056358667302c17d3da04c20af1e12888 (patch) | |
| tree | 30f1416b0d3e46714aabe2e328188244eea471d4 /src/helpers/Workspace.cpp | |
| parent | fa4aef4531d3ca138cc0c5a87768358fd5d7df7d (diff) | |
Implement window move (#2018)
Diffstat (limited to 'src/helpers/Workspace.cpp')
| -rw-r--r-- | src/helpers/Workspace.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/helpers/Workspace.cpp b/src/helpers/Workspace.cpp index e60c1ea4..e8c74fa2 100644 --- a/src/helpers/Workspace.cpp +++ b/src/helpers/Workspace.cpp @@ -143,3 +143,19 @@ CWindow* CWorkspace::getLastFocusedWindow() { return m_pLastFocusedWindow; } + +void CWorkspace::rememberPrevWorkspace(const CWorkspace* prev) { + if (!prev) { + m_sPrevWorkspace.iID = -1; + m_sPrevWorkspace.name = ""; + return; + } + + if (prev->m_sPrevWorkspace.iID == m_sPrevWorkspace.iID) { + Debug::log(LOG, "Tried to set prev workspace to the same as current one"); + return; + } + + m_sPrevWorkspace.iID = prev->m_iID; + m_sPrevWorkspace.name = prev->m_szName; +} |
