diff --git a/video/out/w32_common.c b/video/out/w32_common.c index b899922f08..a69048414d 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -1419,8 +1419,13 @@ static void gui_thread_reconfig(void *ptr) struct vo *vo = w32->vo; RECT r = get_working_area(w32); - if (!w32->current_fs && !IsMaximized(w32->window) && w32->opts->border) + // for normal window which is auto-positioned (centered), center the window + // rather than the content (by subtracting the borders from the work area) + if (!w32->current_fs && !IsMaximized(w32->window) && w32->opts->border && + !w32->opts->geometry.xy_valid /* specific position not requested */) + { subtract_window_borders(w32, w32->window, &r); + } struct mp_rect screen = { r.left, r.top, r.right, r.bottom }; struct vo_win_geometry geo;