summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2011-11-18 00:59:48 +0100
committerwm4 <wm4@mplayer2.org>2012-03-17 21:06:30 +0100
commitd813a4ede8b9fcd5e06d808be794061d7183b36d (patch)
tree569a42e02d8b5df33b3e5d184879d787be57b518 /libvo
parent0ab7c39a1e910b598079d40a0c61b12568a5172f (diff)
downloadmpv-d813a4ede8b9fcd5e06d808be794061d7183b36d.tar.bz2
mpv-d813a4ede8b9fcd5e06d808be794061d7183b36d.tar.xz
win32: fix fullscreen not working on Windows 7
Switching to fullscreen mode on Windows 7 didn't work: the window position and size weren't set to fullscreen. It turns out that merely calling SetWindowLong caused windows to send move/resize messages, which changed the global variables that were supposed to contain the new window size. Move the SetWindowLong call out of the way to guarantee that always the correct values are used.
Diffstat (limited to 'libvo')
-rw-r--r--libvo/w32_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libvo/w32_common.c b/libvo/w32_common.c
index 9d9812db74..8dcd8a1708 100644
--- a/libvo/w32_common.c
+++ b/libvo/w32_common.c
@@ -458,12 +458,12 @@ static int reinit_window_state(void) {
}
}
- SetWindowLong(vo_window, GWL_STYLE, style);
-
r.left = window_x;
r.right = r.left + vo_dwidth;
r.top = window_y;
r.bottom = r.top + vo_dheight;
+
+ SetWindowLong(vo_window, GWL_STYLE, style);
vo_rect_add_window_borders(&r);
mp_msg(MSGT_VO, MSGL_V, "[vo] reset window bounds: %ld:%ld:%ld:%ld\n",