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;