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.
This commit is contained in:
wm4 2011-11-18 00:59:48 +01:00
parent 0ab7c39a1e
commit d813a4ede8
1 changed files with 2 additions and 2 deletions

View File

@ -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",