Skip to content

Commit eb0382f

Browse files
committed
win32: remove SC_RESTORE handling
It doesn't seem to be neeeded anymore.
1 parent 035ef8d commit eb0382f

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

video/out/w32_common.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ struct vo_w32_state {
118118
bool window_bounds_initialized;
119119

120120
bool current_fs;
121-
bool toggle_fs; // whether the current fullscreen state needs to be switched
122121

123122
// Note: maximized state doesn't involve nor modify windowrc
124123
RECT windowrc; // currently known normal/fullscreen window client rect
@@ -1064,15 +1063,8 @@ static void update_fullscreen_state(struct vo_w32_state *w32)
10641063
{
10651064
if (w32->parent)
10661065
return;
1067-
1068-
bool new_fs = w32->opts->fullscreen;
1069-
if (w32->toggle_fs) {
1070-
new_fs = !w32->current_fs;
1071-
w32->toggle_fs = false;
1072-
}
1073-
1074-
bool toggle_fs = w32->current_fs != new_fs;
1075-
w32->current_fs = new_fs;
1066+
bool toggle_fs = w32->current_fs != w32->opts->fullscreen;
1067+
w32->current_fs = w32->opts->fullscreen;
10761068

10771069
if (toggle_fs && (!w32->opts->window_maximized || w32->unmaximize)) {
10781070
if (w32->current_fs) {
@@ -1562,14 +1554,6 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
15621554
return 0;
15631555
}
15641556
break;
1565-
case SC_RESTORE:
1566-
if (IsMaximized(w32->window) && w32->current_fs) {
1567-
w32->toggle_fs = true;
1568-
reinit_window_state(w32);
1569-
1570-
return 0;
1571-
}
1572-
break;
15731557
}
15741558
// All custom items must use ids of less than 0xF000. The context menu items are
15751559
// also larger than WM_USER, which excludes SCF_ISSECURE.

0 commit comments

Comments
 (0)