diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-05-27 11:19:56 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-05-27 11:19:56 +0000 |
commit | f1744ebb530944d4d2f19b580cf5a00b8204fbf5 (patch) | |
tree | 86041e15de1c3249dd4ecc0c3e7ae0870b2df5d8 /libvo | |
parent | b0c64a623d3b3a7f6b24c0a6746551c247aeeaec (diff) |
new layer handling code under icewm from Attila
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6203 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/x11_common.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 546861ddfc..769f207261 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -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; } |