Skip to content

Commit

Permalink
w32_common: update window style after changing maximized state
Browse files Browse the repository at this point in the history
Maximized state is not allowed without WS_OVERLAPPEDWINDOW style and
doesn't stick. Set the style after.

Fixes: #15093
  • Loading branch information
kasper93 committed Nov 3, 2024
1 parent 42ff6f9 commit b057af0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions video/out/w32_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,8 +1111,6 @@ static void update_maximized_state(struct vo_w32_state *w32, bool leaving_fullsc
if (w32->parent)
return;

update_window_style(w32);

// Apply the maximized state on leaving fullscreen.
if (w32->current_fs && !leaving_fullscreen)
return;
Expand Down Expand Up @@ -1142,6 +1140,8 @@ static void update_maximized_state(struct vo_w32_state *w32, bool leaving_fullsc
}
}

update_window_style(w32);

if (toggle && !w32->current_fs && !w32->opts->window_maximized) {
w32->windowrc = w32->prev_windowrc;
update_window_state(w32);
Expand Down

0 comments on commit b057af0

Please sign in to comment.