summaryrefslogtreecommitdiffstats
path: root/libvo/w32_common.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2008-12-04 01:55:52 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2008-12-04 01:55:52 +0200
commit8c144171bb80dd3d1f7161b97675e78cad00bc65 (patch)
tree7ad930ebc554ab68af1911f4dfd217cc18b86cce /libvo/w32_common.c
parent52ee93c1c64dfaa0afc881c38154b04c100cb617 (diff)
parent8c5889004f7ba9f6fcbca20a05a9301771348408 (diff)
downloadmpv-8c144171bb80dd3d1f7161b97675e78cad00bc65.tar.bz2
mpv-8c144171bb80dd3d1f7161b97675e78cad00bc65.tar.xz
Merge svn changes up to r28087
Conflicts: command.c libao2/ao_ivtv.c libao2/ao_v4l2.c libmpcodecs/dec_video.h libvo/aspect.h libvo/sub.c libvo/sub.h libvo/vo_directx.c libvo/vo_macosx.m libvo/vo_quartz.c mp_core.h mplayer.c mplayer.h osdep/getch2.h osdep/timer.h
Diffstat (limited to 'libvo/w32_common.c')
-rw-r--r--libvo/w32_common.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/libvo/w32_common.c b/libvo/w32_common.c
index 7f25182387..c2502d3f47 100644
--- a/libvo/w32_common.c
+++ b/libvo/w32_common.c
@@ -178,6 +178,11 @@ int vo_w32_check_events(void) {
}
if (WinID >= 0) {
RECT r;
+ GetClientRect(vo_window, &r);
+ if (r.right != vo_dwidth || r.bottom != vo_dheight) {
+ vo_dwidth = r.right; vo_dheight = r.bottom;
+ event_flags |= VO_EVENT_RESIZE;
+ }
GetClientRect(WinID, &r);
if (r.right != vo_dwidth || r.bottom != vo_dheight)
MoveWindow(vo_window, 0, 0, r.right, r.bottom, FALSE);
@@ -383,10 +388,13 @@ int vo_w32_config(uint32_t width, uint32_t height, uint32_t flags) {
o_dwidth = width;
o_dheight = height;
- prev_width = vo_dwidth = width;
- prev_height = vo_dheight = height;
- prev_x = vo_dx;
- prev_y = vo_dy;
+ if (WinID < 0) {
+ // the desired size is ignored in wid mode, it always matches the window size.
+ prev_width = vo_dwidth = width;
+ prev_height = vo_dheight = height;
+ prev_x = vo_dx;
+ prev_y = vo_dy;
+ }
vo_fs = flags & VOFLAG_FULLSCREEN;
vo_vm = flags & VOFLAG_MODESWITCHING;