[metacity] window: return _NET_WM_PID when XRes is not available



commit 3e6358113acf61e0c68419bec6cc68a29603a2ec
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Sep 30 17:04:04 2022 +0300

    window: return _NET_WM_PID when XRes is not available
    
    To use XResQueryClientIds we need XRes 1.2 or newer!
    
    https://gitlab.gnome.org/GNOME/libwnck/-/issues/154

 src/core/window.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/core/window.c b/src/core/window.c
index 1512a18e..194f42b7 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -9298,6 +9298,9 @@ meta_window_remove_pending_unmap (MetaWindow *window,
 pid_t
 meta_window_get_client_pid (MetaWindow *self)
 {
+  if (!META_DISPLAY_HAS_XRES (self->display))
+    return self->net_wm_pid;
+
   if (self->client_pid == -1)
     {
       XResClientIdSpec spec;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]