[metacity] window-props: remove support for _NET_WM_PID
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] window-props: remove support for _NET_WM_PID
- Date: Sat, 12 Sep 2020 12:19:04 +0000 (UTC)
commit 9135966673e9fd430b9e8252abdb9c946295e25b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Sep 12 14:39:54 2020 +0300
window-props: remove support for _NET_WM_PID
src/core/window-private.h | 1 -
src/core/window-props.c | 75 -----------------------------------------------
src/core/window.c | 1 -
3 files changed, 77 deletions(-)
---
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 232d9d9a..05b3ac6f 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -131,7 +131,6 @@ struct _MetaWindow
char *startup_id;
char *gtk_theme_variant;
- int net_wm_pid;
pid_t client_pid;
Window xtransient_for;
diff --git a/src/core/window-props.c b/src/core/window-props.c
index 1f241b4e..bc5e235e 100644
--- a/src/core/window-props.c
+++ b/src/core/window-props.c
@@ -43,7 +43,6 @@
#include "frame-private.h"
#include "group.h"
#include <X11/Xatom.h>
-#include <X11/extensions/XRes.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
@@ -396,74 +395,6 @@ reload_wm_window_role (MetaWindow *window,
window->role = g_strdup (value->v.str);
}
-static pid_t
-get_local_pid (MetaWindow *window)
-{
- pid_t pid;
- XResClientIdSpec spec;
- long num_ids;
- XResClientIdValue *client_ids;
- long i;
-
- pid = -1;
-
- spec.client = window->xwindow;
- spec.mask = XRES_CLIENT_ID_PID_MASK;
-
- XResQueryClientIds (window->display->xdisplay,
- 1,
- &spec,
- &num_ids,
- &client_ids);
-
- for (i = 0; i < num_ids; i++)
- {
- if (client_ids[i].spec.mask == XRES_CLIENT_ID_PID_MASK)
- {
- pid = XResGetClientPid (&client_ids[i]);
- break;
- }
- }
-
- XResClientIdsDestroy (num_ids, client_ids);
-
- return pid;
-}
-
-static void
-reload_net_wm_pid (MetaWindow *window,
- MetaPropValue *value,
- gboolean initial)
-{
- pid_t pid;
-
- pid = get_local_pid (window);
-
- if (pid != -1)
- {
- meta_verbose ("Ignoring _NET_WM_PID in favor of XResGetClientPid\n");
-
- window->net_wm_pid = pid;
- return;
- }
-
- if (value->type != META_PROP_VALUE_INVALID)
- {
- gulong cardinal = (int) value->v.cardinal;
-
- if (cardinal <= 0)
- {
- g_warning ("Application set a bogus _NET_WM_PID %lu", cardinal);
- }
- else
- {
- window->net_wm_pid = cardinal;
- meta_verbose ("Window has _NET_WM_PID %d\n",
- window->net_wm_pid);
- }
- }
-}
-
static void
reload_net_wm_user_time (MetaWindow *window,
MetaPropValue *value,
@@ -1847,12 +1778,6 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
reload_wm_class,
LOAD_INIT | INCLUDE_OR
},
- {
- display->atom__NET_WM_PID,
- META_PROP_VALUE_CARDINAL,
- reload_net_wm_pid,
- LOAD_INIT | INCLUDE_OR
- },
{
XA_WM_NAME,
META_PROP_VALUE_TEXT_PROPERTY,
diff --git a/src/core/window.c b/src/core/window.c
index 5e149d49..c3a091f3 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -567,7 +567,6 @@ meta_window_new (MetaDisplay *display,
window->startup_id = NULL;
window->gtk_theme_variant = NULL;
- window->net_wm_pid = -1;
window->client_pid = -1;
window->xtransient_for = None;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]