summaryrefslogtreecommitdiffstats
path: root/x11-libs/gtk+/files/gtk+-1.2.10-cvs-netwmpid.patch
blob: a9c7bbfe9b7ce5cceb6c29754e3418c65aaefe82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- gtk-1.2.10/gdkwindow.c	Tue Jan 22 16:42:19 2002
+++ gtk/gdk/gdkwindow.c	Sat Oct 13 17:10:16 2001
@@ -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 @@
       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;
 }