Implement window move (#2018)

This commit is contained in:
Hilmar Wiegand
2023-04-10 21:07:49 +02:00
committed by GitHub
parent fa4aef4531
commit 7b43f9f056
4 changed files with 76 additions and 54 deletions

View File

@@ -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;
}