fix credentials of invalid surfaces

This commit is contained in:
vaxerski 2023-03-03 11:17:43 +00:00
parent 489ef7c51c
commit 9e028d56c0

View file

@ -161,6 +161,10 @@ void CWindow::updateWindowDecos() {
pid_t CWindow::getPID() { pid_t CWindow::getPID() {
pid_t PID = -1; pid_t PID = -1;
if (!m_bIsX11) { if (!m_bIsX11) {
if (!m_bIsMapped)
return -1;
wl_client_get_credentials(wl_resource_get_client(m_uSurface.xdg->resource), &PID, nullptr, nullptr); wl_client_get_credentials(wl_resource_get_client(m_uSurface.xdg->resource), &PID, nullptr, nullptr);
} else { } else {
PID = m_uSurface.xwayland->pid; PID = m_uSurface.xwayland->pid;