static int readytogo;
-static void force_normal(HWND hwnd)
+void force_normal(HWND hwnd)
{
static int recurse = 0;
recurse = 1;
wp.length = sizeof(wp);
- if (GetWindowPlacement(hwnd, &wp))
+ if (GetWindowPlacement(hwnd, &wp) && wp.showCmd == SW_SHOWMAXIMIZED)
{
wp.showCmd = SW_SHOWNORMAL;
SetWindowPlacement(hwnd, &wp);
ret = DialogBox (hinst, MAKEINTRESOURCE(IDD_RECONF), hwnd, ReconfDlgProc);
if (!ret)
cfg = backup_cfg; /* structure copy */
- else
- force_normal(hwnd);
return ret;
}