# HG changeset patch # User atmos4 # Date 1023922678 0 # Node ID 15a6a5c78f3578a0015784453bfcb223a4e4f5b1 # Parent 8d332415d037372cf57b71b5be9ee97b45328f76 Michele Balistreri : 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. diff -r 8d332415d037 -r 15a6a5c78f35 libvo/x11_common.c --- a/libvo/x11_common.c Wed Jun 12 20:18:12 2002 +0000 +++ b/libvo/x11_common.c Wed Jun 12 22:57:58 2002 +0000 @@ -1,9 +1,11 @@ #include #include +#include #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;