Desktop/history: Move history to desktop (#12676)

This commit is contained in:
Vaxry 2025-12-20 22:16:13 +00:00 committed by GitHub
parent 70f54a1e1b
commit b9bef69554
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 372 additions and 181 deletions

View file

@ -1480,29 +1480,6 @@ void CMonitor::moveTo(const Vector2D& pos) {
m_position = pos;
}
SWorkspaceIDName CMonitor::getPrevWorkspaceIDName(const WORKSPACEID id) {
while (!m_prevWorkSpaces.empty()) {
const int PREVID = m_prevWorkSpaces.top();
m_prevWorkSpaces.pop();
if (PREVID == id) // skip same workspace
continue;
// recheck if previous workspace's was moved to another monitor
const auto ws = g_pCompositor->getWorkspaceByID(PREVID);
if (ws && ws->monitorID() == m_id)
return {.id = PREVID, .name = ws->m_name};
}
return {.id = WORKSPACE_INVALID};
}
void CMonitor::addPrevWorkspaceID(const WORKSPACEID id) {
if (!m_prevWorkSpaces.empty() && m_prevWorkSpaces.top() == id)
return;
m_prevWorkSpaces.emplace(id);
}
Vector2D CMonitor::middle() {
return m_position + m_size / 2.f;
}