From c8d9e2eb60e942009c35270b97045e84e74dd5d5 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 18:28:35 +0000 Subject: Set modified window position and monitor aspect in vo_vm_switch instead of in individual vo drivers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27923 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_x11.c | 4 ---- libvo/vo_xv.c | 1 - libvo/x11_common.c | 7 +++++++ 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'libvo') diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 0bf0877179..41de2c7e95 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -388,10 +388,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } 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); diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 7386505d8a..d557838738 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -243,7 +243,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } vo_vm_switch(vm_width, vm_height, &modeline_width, &modeline_height); - aspect_save_screenres(modeline_width, modeline_height); } else #endif XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), diff --git a/libvo/x11_common.c b/libvo/x11_common.c index cfbdc83d9a..f03a062d73 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -1790,9 +1790,16 @@ void vo_vm_switch(uint32_t X, uint32_t Y, int *modeline_width, 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); } } -- cgit v1.2.3