diff options
author | vaxerski <[email protected]> | 2023-03-03 11:17:43 +0000 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-03-03 11:17:43 +0000 |
commit | 9e028d56c01aacc51904890bd5442ade3a2c7cdd (patch) | |
tree | 3a6e3991dbf441943e2e1baff324bf310742c0d7 | |
parent | 489ef7c51c7d33eeba6d6a66b6697f52441ddf45 (diff) | |
download | Hyprland-9e028d56c01aacc51904890bd5442ade3a2c7cdd.tar.gz Hyprland-9e028d56c01aacc51904890bd5442ade3a2c7cdd.zip |
fix credentials of invalid surfaces
-rw-r--r-- | src/Window.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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; |