changes in fullscreen/window switching code to obtain returning to

old window position (icewm aware) while using -vo x11 -zoom


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4781 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
atlka 2002-02-21 10:49:57 +00:00
parent aeee115c28
commit 3b8318ecd1
1 changed files with 8 additions and 4 deletions

View File

@ -618,10 +618,12 @@ static uint32_t control(uint32_t request, void *data, ...)
int foo;
Window root;
vo_x11_decoration( mDisplay,mywindow,0 );
XGetGeometry(mDisplay, mywindow, &root, &foo, &foo,
&vo_fs_oldwidth, &vo_fs_oldheight, &foo, &foo);
XTranslateCoordinates(mDisplay, mywindow, root, 0, 0,
&vo_fs_oldx, &vo_fs_oldy, &foo);
&vo_fs_oldwidth, &vo_fs_oldheight, &foo, &foo);
XTranslateCoordinates(mDisplay, mywindow, root, 0, 0,
&vo_fs_oldx, &vo_fs_oldy,(Window *) &foo);
mp_msg(MSGT_VO,MSGL_V,"X11 Fullscreen: saved old place: %dx%d-%dx%d\n",
vo_fs_oldx, vo_fs_oldy, vo_fs_oldwidth, vo_fs_oldheight);
@ -631,12 +633,13 @@ static uint32_t control(uint32_t request, void *data, ...)
vo_dheight = vo_screenheight;
XMoveResizeWindow(mDisplay, mywindow, 0, 0,
vo_screenwidth, vo_screenheight);
vo_x11_decoration( mDisplay,mywindow,0 );
XSync(mDisplay, False);
}
else
{
XMoveResizeWindow(mDisplay, mywindow, vo_fs_oldx, vo_fs_oldy,
vo_fs_oldwidth, vo_fs_oldheight);
vo_x11_decoration( mDisplay,mywindow,1 );
/* restore */
vo_dwidth = vo_fs_oldwidth;
@ -645,6 +648,7 @@ static uint32_t control(uint32_t request, void *data, ...)
/* clean */
vo_fs_oldwidth = -1;
vo_fs_oldheight = -1;
XSync(mDisplay, False);
}
}
return VO_NOTIMPL;