diff options
author | henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-11 14:26:07 +0000 |
---|---|---|
committer | henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-11 14:26:07 +0000 |
commit | 35dc94a7925de590af7e5db55e3b07becfbbe049 (patch) | |
tree | 7526413ff622655b7f69dfc83185ae7121c502fc /libvo/x11_common.c | |
parent | 46e3f00bc53cd8229775b423bfb16337f09b9f31 (diff) |
reversed wm order in vo_x11_setlayer + even upper layer for GNOME compliant wm's
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8148 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r-- | libvo/x11_common.c | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c index fc6e08641d..2b02905263 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -629,7 +629,7 @@ void vo_x11_sizehint( int x, int y, int width, int height, int max ) #define WIN_LAYER_ONBOTTOM 2 #define WIN_LAYER_NORMAL 4 -#define WIN_LAYER_ONTOP 6 +#define WIN_LAYER_ONTOP 10 void vo_x11_setlayer( int layer ) { @@ -655,6 +655,30 @@ void vo_x11_setlayer( int layer ) return; } + type=XInternAtom( mDisplay,"_WIN_SUPPORTING_WM_CHECK",False ); + if ( Success == XGetWindowProperty( mDisplay,mRootWin,type,0,16384,False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char**)(&args) ) && nitems > 0 ) + { + XClientMessageEvent xev; + + mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] Gnome style stay on top ( layer %d ).\n",layer ); + memset( &xev,0,sizeof( xev ) ); + xev.type=ClientMessage; + xev.window=vo_window; + xev.message_type=XInternAtom( mDisplay,"_WIN_LAYER",False ); + xev.format=32; + switch ( layer ) + { + case -1: xev.data.l[0] = WIN_LAYER_ONBOTTOM; break; + case 0: xev.data.l[0] = WIN_LAYER_NORMAL; break; + case 1: xev.data.l[0] = WIN_LAYER_ONTOP; break; + } + + if ( layer ) XRaiseWindow( mDisplay,vo_window ); + XSendEvent( mDisplay,mRootWin,False,SubstructureNotifyMask,(XEvent*)&xev ); + + XFree( args ); + return; + } type=XInternAtom( mDisplay,"_NET_SUPPORTED",False ); if ( Success == XGetWindowProperty( mDisplay,mRootWin,type,0,16384,False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char**)(&args) ) && nitems > 0 ) { @@ -680,29 +704,6 @@ void vo_x11_setlayer( int layer ) XFree( args ); return; } - type=XInternAtom( mDisplay,"_WIN_SUPPORTING_WM_CHECK",False ); - if ( Success == XGetWindowProperty( mDisplay,mRootWin,type,0,16384,False,AnyPropertyType,&type,&format,&nitems,&bytesafter,(unsigned char**)(&args) ) && nitems > 0 ) - { - XClientMessageEvent xev; - - mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] Gnome style stay on top ( layer %d ).\n",layer ); - memset( &xev,0,sizeof( xev ) ); - xev.type=ClientMessage; - xev.window=vo_window; - xev.message_type=XInternAtom( mDisplay,"_WIN_LAYER",False ); - xev.format=32; - switch ( layer ) - { - case -1: xev.data.l[0] = WIN_LAYER_ONBOTTOM; break; - case 0: xev.data.l[0] = WIN_LAYER_NORMAL; break; - case 1: xev.data.l[0] = WIN_LAYER_ONTOP; break; - } - XSendEvent( mDisplay,mRootWin,False,SubstructureNotifyMask,(XEvent*)&xev ); - if ( layer ) XRaiseWindow( mDisplay,vo_window ); - - XFree( args ); - return; - } } void vo_x11_fullscreen( void ) |