# HG changeset patch # User reimar # Date 1226773715 0 # Node ID 08a5ccceb21a1503c49634ae0445ceb0b69c992d # Parent 2418fb29237599c4bc3ddb2c82a0a8570d0539c1 Set modified window position and monitor aspect in vo_vm_switch instead of in individual vo drivers. diff -r 2418fb292375 -r 08a5ccceb21a libvo/vo_x11.c --- 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); diff -r 2418fb292375 -r 08a5ccceb21a libvo/vo_xv.c --- 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), diff -r 2418fb292375 -r 08a5ccceb21a libvo/x11_common.c --- 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); } }