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:
parent
3cb86d9fa8
commit
866f8e2d96
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user