From 9e028d56c01aacc51904890bd5442ade3a2c7cdd Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 3 Mar 2023 11:17:43 +0000 Subject: [PATCH] fix credentials of invalid surfaces --- src/Window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Window.cpp b/src/Window.cpp index 1c3d0338..c54ec0dc 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -161,6 +161,10 @@ void CWindow::updateWindowDecos() { pid_t CWindow::getPID() { pid_t PID = -1; if (!m_bIsX11) { + + if (!m_bIsMapped) + return -1; + wl_client_get_credentials(wl_resource_get_client(m_uSurface.xdg->resource), &PID, nullptr, nullptr); } else { PID = m_uSurface.xwayland->pid;