[metacity] window: remove incorrect mask check



commit 7c1cc3ca1d8131499b9cf2ef50b295602ffd6112
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Tue Mar 22 18:44:52 2022 +0200

    window: remove incorrect mask check
    
    XResGetClientPid already checks for XRES_CLIENT_ID_PID_MASK and
    does that correctly. We were doing direct comparition that would
    fail if mask would include something else.

 src/core/window.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 953a9af9..7933a0f9 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -9322,11 +9322,10 @@ meta_window_get_client_pid (MetaWindow *self)
 
       for (i = 0; i < num_ids; i++)
         {
-          if (client_ids[i].spec.mask == XRES_CLIENT_ID_PID_MASK)
-            {
-              self->client_pid = XResGetClientPid (&client_ids[i]);
-              break;
-            }
+          self->client_pid = XResGetClientPid (&client_ids[i]);
+
+          if (self->client_pid != -1)
+            break;
         }
 
       XResClientIdsDestroy (num_ids, client_ids);


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