check window validity in getfirstwindowonworkspace

This commit is contained in:
Vaxry 2022-08-01 00:45:06 +02:00
parent 46e18e08d1
commit 8a4e04d789

View file

@ -810,7 +810,7 @@ int CCompositor::getWindowsOnWorkspace(const int& id) {
CWindow* CCompositor::getFirstWindowOnWorkspace(const int& id) {
for (auto& w : m_vWindows) {
if (w->m_iWorkspaceID == id)
if (w->m_iWorkspaceID == id && w->m_bIsMapped && !w->m_bHidden)
return w.get();
}