From 72c967aa895cd0d3ca0b3e06ed43394a94523843 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 6 Jun 2022 15:03:06 +0200 Subject: [PATCH] fix class crash with unmanaged x11 --- src/managers/XWaylandManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 1a2c329b..5ffbe36f 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -94,6 +94,9 @@ std::string CHyprXWaylandManager::getAppIDClass(CWindow* pWindow) { try { if (pWindow->m_bIsX11) { if (pWindow->m_uSurface.xwayland) { + if (!pWindow->m_bMappedX11 || !pWindow->m_bIsMapped) + return "unmanaged X11"; + return std::string(pWindow->m_uSurface.xwayland->_class); } } else if (pWindow->m_uSurface.xdg) {