Skip to content

win32: remove SC_RESTORE handling #16127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 2 additions & 20 deletions video/out/w32_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ struct vo_w32_state {
bool window_bounds_initialized;

bool current_fs;
bool toggle_fs; // whether the current fullscreen state needs to be switched

// Note: maximized state doesn't involve nor modify windowrc
RECT windowrc; // currently known normal/fullscreen window client rect
Expand Down Expand Up @@ -1059,17 +1058,8 @@ static void update_fullscreen_state(struct vo_w32_state *w32)
{
if (w32->parent)
return;

bool new_fs = w32->opts->fullscreen;
if (w32->toggle_fs) {
new_fs = !w32->current_fs;
w32->toggle_fs = false;
}

bool toggle_fs = w32->current_fs != new_fs;
w32->opts->fullscreen = w32->current_fs = new_fs;
m_config_cache_write_opt(w32->opts_cache,
&w32->opts->fullscreen);
bool toggle_fs = w32->current_fs != w32->opts->fullscreen;
w32->current_fs = w32->opts->fullscreen;

if (toggle_fs && (!w32->opts->window_maximized || w32->unmaximize)) {
if (w32->current_fs) {
Expand Down Expand Up @@ -1559,14 +1549,6 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
return 0;
}
break;
case SC_RESTORE:
if (IsMaximized(w32->window) && w32->current_fs) {
w32->toggle_fs = true;
reinit_window_state(w32);

return 0;
}
break;
}
// All custom items must use ids of less than 0xF000. The context menu items are
// also larger than WM_USER, which excludes SCF_ISSECURE.
Expand Down
Loading