sanity check on last window

This commit is contained in:
vaxerski
2022-09-01 11:46:36 +02:00
parent 1d4d2f4793
commit bb90ff0461
3 changed files with 13 additions and 4 deletions

View File

@@ -119,4 +119,11 @@ void CWorkspace::moveToMonitor(const int& id) {
wlr_ext_workspace_handle_v1_set_urgent(m_pWlrHandle, false);
wlr_ext_workspace_handle_v1_set_name(m_pWlrHandle, m_szName.c_str());
}
}
CWindow* CWorkspace::getLastFocusedWindow() {
if (!g_pCompositor->windowValidMapped(m_pLastFocusedWindow) || m_pLastFocusedWindow->m_iWorkspaceID != m_iID)
return nullptr;
return m_pLastFocusedWindow;
}