From d9b794af77e2def55bfb8fc91a42a80572fd7f18 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 19 Sep 2001 22:09:17 +0000 Subject: [PATCH] Set _NET_WM_PID and WM_CLIENT_MACHINE properties on each window, not just Wed Sep 19 17:59:27 2001 Owen Taylor * gdk/x11/gdkwindow-x11.c (gdk_window_new): Set _NET_WM_PID and WM_CLIENT_MACHINE properties on each window, not just on the client leader. (#58463) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gdk/x11/gdkwindow-x11.c | 12 ++++++++++++ 8 files changed, 54 insertions(+) diff --git a/ChangeLog b/ChangeLog index d9bdd2e87b..cb52f8f1a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Sep 19 17:59:27 2001 Owen Taylor + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): Set + _NET_WM_PID and WM_CLIENT_MACHINE properties on each + window, not just on the client leader. (#58463) + Wed Sep 19 17:28:47 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_new): Add missing cast. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index d9bdd2e87b..cb52f8f1a9 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Wed Sep 19 17:59:27 2001 Owen Taylor + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): Set + _NET_WM_PID and WM_CLIENT_MACHINE properties on each + window, not just on the client leader. (#58463) + Wed Sep 19 17:28:47 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_new): Add missing cast. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d9bdd2e87b..cb52f8f1a9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Wed Sep 19 17:59:27 2001 Owen Taylor + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): Set + _NET_WM_PID and WM_CLIENT_MACHINE properties on each + window, not just on the client leader. (#58463) + Wed Sep 19 17:28:47 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_new): Add missing cast. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index d9bdd2e87b..cb52f8f1a9 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Wed Sep 19 17:59:27 2001 Owen Taylor + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): Set + _NET_WM_PID and WM_CLIENT_MACHINE properties on each + window, not just on the client leader. (#58463) + Wed Sep 19 17:28:47 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_new): Add missing cast. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index d9bdd2e87b..cb52f8f1a9 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Wed Sep 19 17:59:27 2001 Owen Taylor + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): Set + _NET_WM_PID and WM_CLIENT_MACHINE properties on each + window, not just on the client leader. (#58463) + Wed Sep 19 17:28:47 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_new): Add missing cast. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index d9bdd2e87b..cb52f8f1a9 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Wed Sep 19 17:59:27 2001 Owen Taylor + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): Set + _NET_WM_PID and WM_CLIENT_MACHINE properties on each + window, not just on the client leader. (#58463) + Wed Sep 19 17:28:47 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_new): Add missing cast. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d9bdd2e87b..cb52f8f1a9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Wed Sep 19 17:59:27 2001 Owen Taylor + + * gdk/x11/gdkwindow-x11.c (gdk_window_new): Set + _NET_WM_PID and WM_CLIENT_MACHINE properties on each + window, not just on the client leader. (#58463) + Wed Sep 19 17:28:47 2001 Owen Taylor * gtk/gtkwidget.c (gtk_widget_new): Add missing cast. diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index f5a65e6acd..262aa9f0da 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "gdk.h" #include "config.h" @@ -326,6 +327,7 @@ gdk_window_new (GdkWindow *parent, unsigned int class; char *title; int i; + int pid; g_return_val_if_fail (attributes != NULL, NULL); @@ -578,6 +580,16 @@ gdk_window_new (GdkWindow *parent, if (!wm_client_leader_atom) wm_client_leader_atom = gdk_atom_intern ("WM_CLIENT_LEADER", FALSE); + + /* This will set WM_CLIENT_MACHINE and WM_LOCALE_NAME */ + XSetWMProperties (xdisplay, xid, NULL, NULL, NULL, 0, NULL, NULL, NULL); + + pid = getpid (); + XChangeProperty (xdisplay, xid, + gdk_atom_intern ("_NET_WM_PID", FALSE), + XA_CARDINAL, 32, + PropModeReplace, + (guchar *)&pid, 1); XChangeProperty (xdisplay, xid, wm_client_leader_atom,