Mercurial > mplayer.hg
changeset 6202:1e275c6cabb2
new layer handling code under icewm from Attila
author | pontscho |
---|---|
date | Mon, 27 May 2002 11:19:56 +0000 |
parents | f454e289070f |
children | 94330609dd5b |
files | cfg-mplayer.h libvo/x11_common.c |
diffstat | 2 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/cfg-mplayer.h Mon May 27 07:18:14 2002 +0000 +++ b/cfg-mplayer.h Mon May 27 11:19:56 2002 +0000 @@ -68,6 +68,7 @@ #ifdef HAVE_X11 extern char *mDisplayName; extern int WinID; +extern int ice_layer; #endif #ifdef HAVE_AA @@ -241,6 +242,7 @@ // 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
--- a/libvo/x11_common.c Mon May 27 07:18:14 2002 +0000 +++ b/libvo/x11_common.c Mon May 27 11:19:56 2002 +0000 @@ -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 @@ 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; }