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
2023-08-20 20:21:14 +02:00
committed by sfan5
parent f2453b60ee
commit f88ed14168
+1 -1
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);