~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Apparently MsgWaitForMultipleObjects doesn't always return the
[sgt/putty]
/
windows
/
window.c
diff --git
a/windows/window.c
b/windows/window.c
index
81a28aa
..
4855de5
100644
(file)
--- a/
windows/window.c
+++ b/
windows/window.c
@@
-836,9
+836,7
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
sfree(handles);
sfree(handles);
- if (GetMessage(&msg, NULL, 0, 0) != 1)
- break;
- do {
+ while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
if (msg.message == WM_QUIT)
goto finished; /* two-level break */
if (msg.message == WM_QUIT)
goto finished; /* two-level break */
@@
-852,7
+850,7
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
*/
if (must_close_session)
close_session();
*/
if (must_close_session)
close_session();
- }
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE));
+ }
/* The messages seem unreliable; especially if we're being tricky */
term_set_focus(term, GetForegroundWindow() == hwnd);
/* The messages seem unreliable; especially if we're being tricky */
term_set_focus(term, GetForegroundWindow() == hwnd);