1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-04 06:01:56 +00:00

fullscreen -- round three -- icewm fullscreen fixed

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6035 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2002-05-09 17:28:09 +00:00
parent 9cd5020d58
commit be3f44df05
2 changed files with 31 additions and 8 deletions

View File

@ -729,6 +729,19 @@ void wsSetLayer( Display * wsDisplay, Window win, int layer )
unsigned long nitems, bytesafter;
unsigned char * args = NULL;
if ( wsWMType == wsWMIceWM )
{
switch ( layer )
{
case -1: layer=2; break; // WinLayerBelow
case 0: layer=4; break; // WinLayerNormal
case 1: layer=8; break; // WinLayerOnTop
}
XChangeProperty( wsDisplay,win,
XInternAtom( wsDisplay,"_WIN_LAYER",False ),XA_CARDINAL,32,PropModeReplace,(unsigned char *)&layer,1 );
return;
}
type=XInternAtom( wsDisplay,"_NET_SUPPORTED",False );
if ( Success == XGetWindowProperty( wsDisplay,wsRootWin,type,0,65536 / sizeof( long ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,&args ) && nitems > 0 )
{
@ -814,7 +827,7 @@ void wsFullScreen( wsTWindow * win )
win->SizeHint.flags=PPosition | PSize | PWinGravity;// | PBaseSize;
win->SizeHint.x=win->X; win->SizeHint.y=win->Y;
win->SizeHint.width=win->Width; win->SizeHint.height=win->Height;
win->SizeHint.base_width=win->Width; win->SizeHint.base_height=win->Height;
// win->SizeHint.base_width=win->Width; win->SizeHint.base_height=win->Height;
win->SizeHint.win_gravity=StaticGravity;
if ( win->Property & wsMaxSize )

View File

@ -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 )