mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-15 10:08:06 -05:00
Add some spare SetForegroundWindow and SetActiveWindow calls to try
to improve window behaviour. Also make the About box a subdialog of the config box instead of a separate child of the root. [originally from svn r1139]
This commit is contained in:
parent
38b6d276d2
commit
7b7ec7e72e
4
windlg.c
4
windlg.c
@ -2426,8 +2426,7 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
|
|||||||
}
|
}
|
||||||
if (msg == WM_COMMAND && LOWORD(wParam) == IDCX_ABOUT) {
|
if (msg == WM_COMMAND && LOWORD(wParam) == IDCX_ABOUT) {
|
||||||
EnableWindow(hwnd, 0);
|
EnableWindow(hwnd, 0);
|
||||||
DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX),
|
DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, AboutProc);
|
||||||
GetParent(hwnd), AboutProc);
|
|
||||||
EnableWindow(hwnd, 1);
|
EnableWindow(hwnd, 1);
|
||||||
SetActiveWindow(hwnd);
|
SetActiveWindow(hwnd);
|
||||||
}
|
}
|
||||||
@ -2452,6 +2451,7 @@ void defuse_showwindow(void)
|
|||||||
hwnd = CreateDialog(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX),
|
hwnd = CreateDialog(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX),
|
||||||
NULL, NullDlgProc);
|
NULL, NullDlgProc);
|
||||||
ShowWindow(hwnd, SW_HIDE);
|
ShowWindow(hwnd, SW_HIDE);
|
||||||
|
SetActiveWindow(hwnd);
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
window.c
1
window.c
@ -574,6 +574,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
|||||||
* Finally show the window!
|
* Finally show the window!
|
||||||
*/
|
*/
|
||||||
ShowWindow(hwnd, show);
|
ShowWindow(hwnd, show);
|
||||||
|
SetForegroundWindow(hwnd);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Open the initial log file if there is one.
|
* Open the initial log file if there is one.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user