1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-19 01:47:38 +00:00

win32_common: fixes minimized window being focused on launch

mpv was taking focus when being started with "--window-minimized=yes". This change stops mpv from taking focus when this option is used.

Resolves: #9641
This commit is contained in:
mwalmer 2022-01-25 11:59:02 -05:00 committed by sfan5
parent f2453b60ee
commit f88ed14168

View File

@ -969,7 +969,7 @@ static void update_window_state(struct vo_w32_state *w32)
// Show the window if it's not yet visible
if (!is_visible(w32->window)) {
if (w32->opts->window_minimized) {
ShowWindow(w32->window, SW_SHOWMINIMIZED);
ShowWindow(w32->window, SW_SHOWMINNOACTIVE);
update_maximized_state(w32); // Set the WPF_RESTORETOMAXIMIZED flag
} else if (w32->opts->window_maximized) {
ShowWindow(w32->window, SW_SHOWMAXIMIZED);