Unified · Split
| @@ -1117,7 +1117,10 @@ static void update_maximized_state(struct vo_w32_state *w32, bool leaving_fullsc · 1116 unmodified lines | |||
| 1117 | if (w32->current_fs && !leaving_fullscreen) | 1117 | if (w32->current_fs && !leaving_fullscreen) |
| 1118 | return; | 1118 | return; |
| 1119 | 1119 | ||
| 1120 | bool toggle = !w32->opts->window_maximized && IsMaximized(w32->window); | 1120 | bool toggle = w32->opts->window_maximized ^ IsMaximized(w32->window); |
| 1121 | |||
| 1122 | if (toggle && !w32->current_fs && w32->opts->window_maximized) | ||
| 1123 | w32->prev_windowrc = w32->windowrc; | ||
| 1121 | 1124 | ||
| 1122 | WINDOWPLACEMENT wp = { .length = sizeof wp }; | 1125 | WINDOWPLACEMENT wp = { .length = sizeof wp }; |
| 1123 | GetWindowPlacement(w32->window, &wp); | 1126 | GetWindowPlacement(w32->window, &wp); |
| @@ -1139,7 +1142,7 @@ static void update_maximized_state(struct vo_w32_state *w32, bool leaving_fullsc · 15 unmodified lines | |||
| 1139 | } | 1142 | } |
| 1140 | } | 1143 | } |
| 1141 | 1144 | ||
| 1142 | if (toggle && !w32->current_fs) { | 1145 | if (toggle && !w32->current_fs && !w32->opts->window_maximized) { |
| 1143 | w32->windowrc = w32->prev_windowrc; | 1146 | w32->windowrc = w32->prev_windowrc; |
| 1144 | update_window_state(w32); | 1147 | update_window_state(w32); |
| 1145 | } | 1148 | } |