guard windows' validity in focuswindowbyclass

This commit is contained in:
vaxerski 2022-06-25 21:18:33 +02:00
parent 2c8cf6afc4
commit 45898a57c8

View file

@ -999,6 +999,9 @@ void CKeybindManager::focusWindowByClass(std::string clazz) {
std::regex classCheck(clazz); std::regex classCheck(clazz);
for (auto& w : g_pCompositor->m_lWindows) { for (auto& w : g_pCompositor->m_lWindows) {
if (!w.m_bIsMapped || w.m_bHidden)
continue;
const auto windowClass = g_pXWaylandManager->getAppIDClass(&w); const auto windowClass = g_pXWaylandManager->getAppIDClass(&w);
if (!std::regex_search(windowClass, classCheck)) if (!std::regex_search(windowClass, classCheck))