Skip to content

Commit

Permalink
enforce minimum window size on restore after maximize
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Oct 5, 2024
1 parent 552c580 commit 4af2dae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/wndproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,14 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
g_config.window_rect.bottom = height;

dd_SetDisplayMode(0, 0, 0, 0);

if (width < g_ddraw.width || height < g_ddraw.height)
{
/* Can't enforce minimum window size in linux because there is no WM_SIZING and
WM_GETMINMAXINFO is ignored for whatever reasons */

SetTimer(g_ddraw.hwnd, IDT_TIMER_LINUX_FIX_WINDOW_SIZE, 1000, (TIMERPROC)NULL);
}
}
}
}
Expand Down

0 comments on commit 4af2dae

Please sign in to comment.