mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
new layer handling code under icewm from Attila
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6203 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b0c64a623d
commit
f1744ebb53
@ -68,6 +68,7 @@ extern int ao_pcm_waveheader;
|
||||
#ifdef HAVE_X11
|
||||
extern char *mDisplayName;
|
||||
extern int WinID;
|
||||
extern int ice_layer;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_AA
|
||||
@ -241,6 +242,7 @@ static config_t mplayer_opts[]={
|
||||
// x11,xv,xmga,xvidix
|
||||
{"wid", &WinID, CONF_TYPE_INT, 0, 0, 0, NULL},
|
||||
{"rootwin", &WinID, CONF_TYPE_FLAG, 0, -1, 0, NULL},
|
||||
{"icelayer", &ice_layer, CONF_TYPE_INT, CONF_RANGE, 0, 15, NULL},
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XINERAMA
|
||||
|
@ -54,6 +54,8 @@
|
||||
#define vo_wm_IceWM 3
|
||||
#define vo_wm_WMakerStyle 4
|
||||
|
||||
int ice_layer=12;
|
||||
|
||||
extern int verbose;
|
||||
|
||||
static int dpms_disabled=0;
|
||||
@ -691,15 +693,16 @@ void vo_x11_setlayer( int layer )
|
||||
|
||||
if ( vo_wm_type == vo_wm_IceWM )
|
||||
{
|
||||
mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] IceWM style stay on top ( layer %d ).\n",layer );
|
||||
switch ( layer )
|
||||
{
|
||||
case -1: layer=2; break; // WinLayerBelow
|
||||
case 0: layer=4; break; // WinLayerNormal
|
||||
case 1: layer=8; break; // WinLayerOnTop
|
||||
}
|
||||
XChangeProperty( mDisplay,vo_window,
|
||||
XInternAtom( mDisplay,"_WIN_LAYER",False ),XA_CARDINAL,32,PropModeReplace,(unsigned char *)&layer,1 );
|
||||
XClientMessageEvent xev;
|
||||
memset(&xev, 0, sizeof(xev));
|
||||
xev.type = ClientMessage;
|
||||
xev.window = vo_window;
|
||||
xev.message_type = XInternAtom(mDisplay, "_WIN_LAYER", False);
|
||||
xev.format = 32;
|
||||
xev.data.l[0] = layer?ice_layer:4; // if not fullscreen, stay on layer "Normal"
|
||||
xev.data.l[1] = CurrentTime;
|
||||
mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] IceWM style stay on top ( layer %d ).\n",xev.data.l[0] );
|
||||
XSendEvent(mDisplay, mRootWin, False, SubstructureNotifyMask, (XEvent *) &xev);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user