check window validity in getfirstwindowonworkspace
Some checks failed
Build Hyprland / Build Hyprland (Arch) (push) Has been cancelled
Build Hyprland / Build Hyprland with Meson (Arch) (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix) (push) Has been cancelled
Nix: update lockfile / update (push) Has been cancelled

This commit is contained in:
vaxerski 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();
}