summaryrefslogtreecommitdiffstats
path: root/libvo/x11_common.c
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-09 17:28:09 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-09 17:28:09 +0000
commitbe3f44df053cf5a18b63b235b05132b088fed11b (patch)
treec2177205d98aafd41109912e14aef3ebb18a07d6 /libvo/x11_common.c
parent9cd5020d5835776729bc552d0b13863d730aa6c5 (diff)
downloadmpv-be3f44df053cf5a18b63b235b05132b088fed11b.tar.bz2
mpv-be3f44df053cf5a18b63b235b05132b088fed11b.tar.xz
fullscreen -- round three -- icewm fullscreen fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6035 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r--libvo/x11_common.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 546dae4f35..b31d7cd04a 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -673,7 +673,20 @@ void vo_x11_setlayer( int layer )
unsigned long nitems, bytesafter;
unsigned char * args = NULL;
- if ( vo_wm_type == vo_wm_IceWM ) return;
+ if ( WinID >= 0 ) return;
+
+ if ( vo_wm_type == vo_wm_IceWM )
+ {
+ 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 );
+ return;
+ }
type=XInternAtom( mDisplay,"_NET_SUPPORTED",False );
if ( Success == XGetWindowProperty( mDisplay,mRootWin,type,0,65536 / sizeof( long ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,&args ) && nitems > 0 )
@@ -681,6 +694,7 @@ void vo_x11_setlayer( int layer )
XEvent e;
mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] NET style stay on top ( layer %d ).\n",layer );
+ memset( &e,0,sizeof( e ) );
e.xclient.type=ClientMessage;
e.xclient.message_type=XInternAtom( mDisplay,"_NET_WM_STATE",False );
e.xclient.display=mDisplay;
@@ -688,9 +702,6 @@ void vo_x11_setlayer( int layer )
e.xclient.format=32;
e.xclient.data.l[0]=layer;
e.xclient.data.l[1]=XInternAtom( mDisplay,"_NET_WM_STATE_STAYS_ON_TOP",False );
- e.xclient.data.l[2]=0l;
- e.xclient.data.l[3]=0l;
- e.xclient.data.l[4]=0l;
XSendEvent( mDisplay,mRootWin,False,SubstructureRedirectMask,&e );
XFree( args );
@@ -725,15 +736,14 @@ void vo_x11_fullscreen( void )
{
int x=0,y=0,w=vo_screenwidth,h=vo_screenheight;
+ if ( WinID >= 0 ) return;
+
switch ( vo_wm_type )
{
case vo_wm_Unknown:
vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 1 : 0 );
XUnmapWindow( mDisplay,vo_window );
break;
- case vo_wm_IceWM:
- if ( !vo_fs ) XUnmapWindow( mDisplay,vo_window );
- break;
}
if ( vo_fs )