summaryrefslogtreecommitdiffstats
path: root/video/out/w32_common.c
diff options
context:
space:
mode:
authormwalmer <75793394+mwalmer@users.noreply.github.com>2022-01-25 11:59:02 -0500
committersfan5 <sfan5@live.de>2023-08-20 20:21:14 +0200
commitf88ed1416841aa01b7ebf69e4cbfb4c1dbf078eb (patch)
tree55af25c2ef93f63db18299b761125dcccaf8672d /video/out/w32_common.c
parentf2453b60ee279790197d9c5783af16552afe1838 (diff)
downloadmpv-f88ed1416841aa01b7ebf69e4cbfb4c1dbf078eb.tar.bz2
mpv-f88ed1416841aa01b7ebf69e4cbfb4c1dbf078eb.tar.xz
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
Diffstat (limited to 'video/out/w32_common.c')
-rw-r--r--video/out/w32_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 4da12182a7..4f16d5b88e 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -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);