diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 5e5c6262e..ca31752dc 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -47,7 +47,7 @@ void CHyprXWaylandManager::activateSurface(SP pSurface, bool } PWINDOW->m_pXWaylandSurface->activate(activate); } - } else if (PWINDOW->m_pXDGSurface) + } else if (PWINDOW->m_pXDGSurface && PWINDOW->m_pXDGSurface->toplevel) PWINDOW->m_pXDGSurface->toplevel->setActive(activate); }