mirror of
https://github.com/mpv-player/mpv
synced 2025-03-07 22:57:42 +00:00
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
This commit is contained in:
parent
c1feb32b17
commit
440b0579b6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user