1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Move the global 'logbox' into windlg.c.

It was only used in one place outside that module, so I've provided an
accessor for that one case.
This commit is contained in:
Simon Tatham 2020-02-02 10:00:42 +00:00
parent 3cb86d9fa8
commit 866f8e2d96
3 changed files with 5 additions and 1 deletions

View File

@ -78,6 +78,9 @@ static char *getevent(int i)
return NULL;
}
static HWND logbox;
HWND event_log_window(void) { return logbox; }
static INT_PTR CALLBACK LogProc(HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam)
{

View File

@ -939,6 +939,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
if (msg.message == WM_QUIT)
goto finished; /* two-level break */
HWND logbox = event_log_window();
if (!(IsWindow(logbox) && IsDialogMessage(logbox, &msg)))
DispatchMessageW(&msg);

View File

@ -211,7 +211,6 @@ typedef void *Ssh_gss_name;
* PuTTY session.
*/
GLOBAL HWND hwnd; /* the main terminal window */
GLOBAL HWND logbox;
/*
* The all-important instance handle.
@ -577,6 +576,7 @@ void showabout(HWND);
void force_normal(HWND hwnd);
void modal_about_box(HWND hwnd);
void show_help(HWND hwnd);
HWND event_log_window(void);
/*
* Exports from winmisc.c.