summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-11-15 18:28:35 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-11-15 18:28:35 +0000
commitc8d9e2eb60e942009c35270b97045e84e74dd5d5 (patch)
tree718954615eab279d0612689670567823f11be01c /libvo
parentf2bceedc4915245e68856442c07eb4198bee1e2c (diff)
downloadmpv-c8d9e2eb60e942009c35270b97045e84e74dd5d5.tar.bz2
mpv-c8d9e2eb60e942009c35270b97045e84e74dd5d5.tar.xz
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
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_x11.c4
-rw-r--r--libvo/vo_xv.c1
-rw-r--r--libvo/x11_common.c7
3 files changed, 7 insertions, 5 deletions
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);
}
}