summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-31 17:54:14 +0200
committerwm4 <wm4@nowhere>2015-05-31 17:54:14 +0200
commitd91d24ba7eaaa359707954672cc029d74e8bbd90 (patch)
treeec3df9247be39223d03592548384c4e71e4e837c
parenta075dfb52c01101c1c7dd53fdd994a05e9a62fb9 (diff)
downloadmpv-d91d24ba7eaaa359707954672cc029d74e8bbd90.tar.bz2
mpv-d91d24ba7eaaa359707954672cc029d74e8bbd90.tar.xz
win32: fix window resize logic
Reconfiguring with the same video size should never cause the window to resize back to the video size (if the user changed its size). This was broken and it resized anyway.
-rw-r--r--video/out/w32_common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 075bda586e..57e4a4a2f9 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -1070,8 +1070,6 @@ static void gui_thread_reconfig(void *ptr)
struct vo_win_geometry geo;
vo_calc_window_geometry(vo, &w32->screenrc, &geo);
vo_apply_window_geometry(vo, &geo);
- w32->dw = vo->dwidth;
- w32->dh = vo->dheight;
bool reset_size = w32->o_dwidth != vo->dwidth || w32->o_dheight != vo->dheight;
@@ -1105,6 +1103,9 @@ static void gui_thread_reconfig(void *ptr)
vo->dheight = r.bottom;
}
+ w32->dw = vo->dwidth;
+ w32->dh = vo->dheight;
+
*res = reinit_window_state(w32);
}