History

win32: keep prev_windowrc consistent also for maximized state

Kacper Michajłow committed 2 years ago

Commit 6da3a151 parent 6ed37811 file · +5 −2Browse files

Unified · Split

video/out/w32_common.c+5−2
@@ -1117,7 +1117,10 @@ static void update_maximized_state(struct vo_w32_state *w32, bool leaving_fullsc · 1116 unmodified lines
11171117 if (w32->current_fs && !leaving_fullscreen)
11181118 return;
11191119
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;
11211124
11221125 WINDOWPLACEMENT wp = { .length = sizeof wp };
11231126 GetWindowPlacement(w32->window, &wp);
@@ -1139,7 +1142,7 @@ static void update_maximized_state(struct vo_w32_state *w32, bool leaving_fullsc · 15 unmodified lines
11391142 }
11401143 }
11411144
1142− if (toggle && !w32->current_fs) {
1145+ if (toggle && !w32->current_fs && !w32->opts->window_maximized) {
11431146 w32->windowrc = w32->prev_windowrc;
11441147 update_window_state(w32);
11451148 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t