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
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 }

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