From 87a4968354dbf100f64e1fa3eccc84fbba83ece4 Mon Sep 17 00:00:00 2001 From: rtognimp Date: Sun, 11 Jul 2004 22:16:52 +0000 Subject: This fixes the problems that originated from my ewmh fs patch, caused by a different handling of the wm's ewmh fs implementations. Patch by Alexander Strasser git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12797 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Gui/wm/ws.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'Gui/wm') diff --git a/Gui/wm/ws.c b/Gui/wm/ws.c index 4a58060ac1..e57c8b05ce 100644 --- a/Gui/wm/ws.c +++ b/Gui/wm/ws.c @@ -770,24 +770,32 @@ void wsFullScreen( wsTWindow * win ) if ( win->isFullScreen ) { + vo_x11_ewmh_fullscreen( _NET_WM_STATE_REMOVE ); // removes fullscreen state if wm supports EWMH + if ( ! (vo_fs_type & vo_wm_FULLSCREEN) ) // shouldn't be needed with EWMH fs + { win->X=win->OldX; win->Y=win->OldY; win->Width=win->OldWidth; win->Height=win->OldHeight; - win->isFullScreen=False; decoration=win->Decorations; + } + #ifdef ENABLE_DPMS wsScreenSaverOn( wsDisplay ); #endif - vo_x11_ewmh_fullscreen( _NET_WM_STATE_REMOVE ); // removes fullscreen state if wm supports EWMH + win->isFullScreen=False; } else { + if ( ! (vo_fs_type & vo_wm_FULLSCREEN) ) // shouldn't be needed with EWMH fs + { win->OldX=win->X; win->OldY=win->Y; win->OldWidth=win->Width; win->OldHeight=win->Height; win->X=wsOrgX; win->Y=wsOrgY; win->Width=wsMaxX; win->Height=wsMaxY; + } + win->isFullScreen=True; #ifdef ENABLE_DPMS wsScreenSaverOff( wsDisplay ); @@ -796,15 +804,23 @@ void wsFullScreen( wsTWindow * win ) vo_x11_ewmh_fullscreen( _NET_WM_STATE_ADD ); // adds fullscreen state if wm supports EWMH } + if ( ! (vo_fs_type & vo_wm_FULLSCREEN) ) // shouldn't be needed with EWMH fs + { vo_x11_decoration( wsDisplay,win->WindowID,decoration ); vo_x11_sizehint( win->X,win->Y,win->Width,win->Height,0 ); vo_x11_setlayer( wsDisplay,win->WindowID,win->isFullScreen ); if ((!(win->isFullScreen)) & vo_ontop) vo_x11_setlayer(wsDisplay, win->WindowID,1); + XMoveResizeWindow( wsDisplay,win->WindowID,win->X,win->Y,win->Width,win->Height ); + } + if ( vo_wm_type == 0 && !(vo_fsmode&16) ) + { XWithdrawWindow( wsDisplay,win->WindowID,wsScreen ); - XMoveResizeWindow( wsDisplay,win->WindowID,win->X,win->Y,win->Width,win->Height ); + } + + XMapRaised( wsDisplay,win->WindowID ); XRaiseWindow( wsDisplay,win->WindowID ); XFlush( wsDisplay ); -- cgit v1.2.3