mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-10 15:48:06 -05:00
Roman Pompejus's fix for the TAB-not-working-in-Event-Log bug
[originally from svn r891]
This commit is contained in:
parent
d58d2cc2bb
commit
bde2f9ac8a
6
putty.h
6
putty.h
@ -84,6 +84,12 @@ GLOBAL int session_closed;
|
||||
#define LGTYP_DEBUG 2 /* logmode: all chars of taffic */
|
||||
GLOBAL char *logfile;
|
||||
|
||||
/*
|
||||
* Window handles for the dialog boxes that can be running during a
|
||||
* PuTTY session.
|
||||
*/
|
||||
GLOBAL HWND logbox;
|
||||
|
||||
/*
|
||||
* I've just looked in the windows standard headr files for WM_USER, there
|
||||
* are hundreds of flags defined using the form WM_USER+123 so I've
|
||||
|
16
windlg.c
16
windlg.c
@ -13,8 +13,6 @@
|
||||
static char **events = NULL;
|
||||
static int nevents = 0, negsize = 0;
|
||||
|
||||
static HWND logbox = NULL, abtbox = NULL;
|
||||
|
||||
static int readytogo;
|
||||
|
||||
void force_normal(HWND hwnd)
|
||||
@ -56,6 +54,7 @@ static int CALLBACK LogProc (HWND hwnd, UINT msg,
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam)) {
|
||||
case IDOK:
|
||||
case IDCANCEL:
|
||||
logbox = NULL;
|
||||
DestroyWindow (hwnd);
|
||||
return 0;
|
||||
@ -145,8 +144,8 @@ static int CALLBACK AboutProc (HWND hwnd, UINT msg,
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam)) {
|
||||
case IDOK:
|
||||
abtbox = NULL;
|
||||
DestroyWindow (hwnd);
|
||||
case IDCANCEL:
|
||||
EndDialog(hwnd, TRUE);
|
||||
return 0;
|
||||
case IDA_LICENCE:
|
||||
EnableWindow(hwnd, 0);
|
||||
@ -158,8 +157,7 @@ static int CALLBACK AboutProc (HWND hwnd, UINT msg,
|
||||
}
|
||||
return 0;
|
||||
case WM_CLOSE:
|
||||
abtbox = NULL;
|
||||
DestroyWindow (hwnd);
|
||||
EndDialog(hwnd, TRUE);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
@ -1996,11 +1994,7 @@ void showeventlog (HWND hwnd) {
|
||||
}
|
||||
|
||||
void showabout (HWND hwnd) {
|
||||
if (!abtbox) {
|
||||
abtbox = CreateDialog (hinst, MAKEINTRESOURCE(IDD_ABOUTBOX),
|
||||
hwnd, AboutProc);
|
||||
ShowWindow (abtbox, SW_SHOWNORMAL);
|
||||
}
|
||||
DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX),hwnd, AboutProc);
|
||||
}
|
||||
|
||||
void verify_ssh_host_key(char *host, int port, char *keytype,
|
||||
|
3
window.c
3
window.c
@ -564,7 +564,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
|
||||
}
|
||||
if(!timer_id)
|
||||
timer_id = SetTimer(hwnd, 1, 20, NULL);
|
||||
DispatchMessage (&msg);
|
||||
if (!(IsWindow(logbox) && IsDialogMessage(logbox, &msg)))
|
||||
DispatchMessage (&msg);
|
||||
|
||||
/* Make sure we blink everything that needs it. */
|
||||
term_blink(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user