diff options
author | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-06-12 22:57:58 +0000 |
---|---|---|
committer | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-06-12 22:57:58 +0000 |
commit | 440b0579b6a8c8ac3f07b9441e63af45b8d8df9b (patch) | |
tree | c2949493122a915a026574bcfbcde2eb8e109694 /libvo | |
parent | c1feb32b17ec01f87616d7f854e54d0bc6e05936 (diff) | |
download | mpv-440b0579b6a8c8ac3f07b9441e63af45b8d8df9b.tar.bz2 mpv-440b0579b6a8c8ac3f07b9441e63af45b8d8df9b.tar.xz |
Michele Balistreri <brain87@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.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6402 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/x11_common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c index b4c9663d24..8536b29626 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -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_decoration( Display * vo_Display,Window w,int d ) 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; |