[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.92,1.93

Atmosfear atmos4 at mplayerhq.hu
Thu Jun 13 00:58:05 CEST 2002


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv7137/libvo

Modified Files:
	x11_common.c 
Log Message:
Michele Balistreri <brain87 at gmx.net>:
This patch makes MPlayer more NetWM compliant, setting the pid of the 
application as a property of the window. It helps the applications trying to 
swallow mplayer (e.g. a browser plugin).

Me:
Various warning/compile fixes.


Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- x11_common.c	8 Jun 2002 20:50:40 -0000	1.92
+++ x11_common.c	12 Jun 2002 22:57:58 -0000	1.93
@@ -1,9 +1,11 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <inttypes.h>
 
 #include "config.h"
 #include "mp_msg.h"
+#include "x11_common.h"
 
 #ifdef X11_FULLSCREEN
 
@@ -511,9 +513,11 @@
 
 void vo_x11_classhint( Display * display,Window window,char *name ){
 	    XClassHint wmClass;
+	    pid_t pid=getpid();
 	    wmClass.res_name = name;
 	    wmClass.res_class = "MPlayer";
 	    XSetClassHint(display,window,&wmClass);
+	    XChangeProperty(display,window, XInternAtom(display,"_NET_WM_PID", False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&pid, 1);
 }
 
 Window     vo_window = None;




More information about the MPlayer-cvslog mailing list