_NET_WM_PID support



Hi,

Here's the GTK 1.2 patch to add _NET_WM_PID.

Havoc

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.1061.2.374
diff -u -p -u -r1.1061.2.374 ChangeLog
--- ChangeLog   2001/09/01 20:25:21     1.1061.2.374
+++ ChangeLog   2001/10/11 02:48:50
@@ -1,3 +1,7 @@
+2001-10-10  Havoc Pennington  <hp pobox com>
+
+       * gdk/gdkwindow.c (gdk_window_new): set _NET_WM_PID
+
 2001-09-02  Abel Cheung  <maddog linux org hk>
 
        * configure.in (ALL_LINGUAS): zh_TW.Big5 -> zh_TW
Index: gdk/gdkwindow.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkwindow.c,v
retrieving revision 1.80.2.11
diff -u -p -u -r1.80.2.11 gdkwindow.c
--- gdk/gdkwindow.c     2001/02/03 00:25:57     1.80.2.11
+++ gdk/gdkwindow.c     2001/10/11 02:48:50
@@ -28,6 +28,9 @@
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 #include <netinet/in.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #include "gdk.h"
 #include "config.h"
 #include "gdkinput.h"
@@ -488,6 +491,15 @@ gdk_window_new (GdkWindow     *parent,
       XFree (class_hint);
     }
   
+  {
+    gulong pid = getpid ();
+    
+    XChangeProperty (private->xdisplay, private->xwindow,
+                     gdk_atom_intern ("_NET_WM_PID", FALSE),
+                     XA_CARDINAL, 32,
+                     PropModeReplace,
+                     (guchar *)&pid, 1);
+  }
   
   return window;
 }





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