diff --git a/app/src/screen.c b/app/src/screen.c index 869ae0e0db..314b47bae0 100644 --- a/app/src/screen.c +++ b/app/src/screen.c @@ -484,15 +484,10 @@ screen_switch_fullscreen(struct screen *screen) { void screen_resize_to_fit(struct screen *screen) { - if (screen->fullscreen) { + if (screen->fullscreen || screen->maximized) { return; } - if (screen->maximized) { - SDL_RestoreWindow(screen->window); - screen->maximized = false; - } - struct size optimal_size = get_optimal_window_size(screen, screen->content_size); SDL_SetWindowSize(screen->window, optimal_size.width, optimal_size.height);