mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-29 15:11:09 +08:00
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:
+2
-2
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user