Mercurial > mplayer.hg
changeset 27889:08a5ccceb21a
Set modified window position and monitor aspect in vo_vm_switch instead of in
individual vo drivers.
author | reimar |
---|---|
date | Sat, 15 Nov 2008 18:28:35 +0000 |
parents | 2418fb292375 |
children | a4e2700e9381 |
files | libvo/vo_x11.c libvo/vo_xv.c libvo/x11_common.c |
diffstat | 3 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_x11.c Sat Nov 15 18:14:03 2008 +0000 +++ b/libvo/vo_x11.c Sat Nov 15 18:28:35 2008 +0000 @@ -388,10 +388,6 @@ } vo_vm_switch(vm_width, vm_height, &modeline_width, &modeline_height); - vo_dx = (vo_screenwidth - modeline_width) / 2; - vo_dy = (vo_screenheight - modeline_height) / 2; - vo_dwidth = modeline_width; - vo_dheight = modeline_height; } #endif bg = WhitePixel(mDisplay, mScreen);
--- a/libvo/vo_xv.c Sat Nov 15 18:14:03 2008 +0000 +++ b/libvo/vo_xv.c Sat Nov 15 18:28:35 2008 +0000 @@ -243,7 +243,6 @@ } vo_vm_switch(vm_width, vm_height, &modeline_width, &modeline_height); - aspect_save_screenres(modeline_width, modeline_height); } else #endif XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay),
--- a/libvo/x11_common.c Sat Nov 15 18:14:03 2008 +0000 +++ b/libvo/x11_common.c Sat Nov 15 18:28:35 2008 +0000 @@ -1790,9 +1790,16 @@ XF86VidModeLockModeSwitch(mDisplay, mScreen, 0); XF86VidModeSwitchToMode(mDisplay, mScreen, vidmodes[j]); XF86VidModeSwitchToMode(mDisplay, mScreen, vidmodes[j]); + + // FIXME: all this is more of a hack than proper solution X = (vo_screenwidth - *modeline_width) / 2; Y = (vo_screenheight - *modeline_height) / 2; XF86VidModeSetViewPort(mDisplay, mScreen, X, Y); + vo_dx = X; + vo_dy = Y; + vo_dwidth = *modeline_width; + vo_dheight = *modeline_height; + aspect_save_screenres(*modeline_width, *modeline_height); } }