Diff

Differences From Artifact [f29cfdd740]:

To Artifact [9892dee49f]:


864
865
866
867
868
869
870


871
872
873
874
875
876
877
878
879
880
881
882
883
884
885


886
887
888
889
890
891
892
	if ((unsigned)(n - WAIT_OBJECT_0) < (unsigned)nhandles) {
	    handle_got_event(handles[n - WAIT_OBJECT_0]);
	    sfree(handles);
	    if (must_close_session)
		close_session();
	} else
	    sfree(handles);



	while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
	    if (msg.message == WM_QUIT)
		goto finished;	       /* two-level break */

	    if (!(IsWindow(logbox) && IsDialogMessage(logbox, &msg)))
		DispatchMessage(&msg);
	    /* Send the paste buffer if there's anything to send */
	    term_paste(term);
	    /* If there's nothing new in the queue then we can do everything
	     * we've delayed, reading the socket, writing, and repainting
	     * the window.
	     */
	    if (must_close_session)
		close_session();


	}

	/* The messages seem unreliable; especially if we're being tricky */
	term_set_focus(term, GetForegroundWindow() == hwnd);

	if (pending_netevent)
	    enact_pending_netevent();







>
>









|
<
<
<


>
>







864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882



883
884
885
886
887
888
889
890
891
892
893
	if ((unsigned)(n - WAIT_OBJECT_0) < (unsigned)nhandles) {
	    handle_got_event(handles[n - WAIT_OBJECT_0]);
	    sfree(handles);
	    if (must_close_session)
		close_session();
	} else
	    sfree(handles);

        run_toplevel_callbacks();

	while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
	    if (msg.message == WM_QUIT)
		goto finished;	       /* two-level break */

	    if (!(IsWindow(logbox) && IsDialogMessage(logbox, &msg)))
		DispatchMessage(&msg);
	    /* Send the paste buffer if there's anything to send */
	    term_paste(term);




	    if (must_close_session)
		close_session();

            run_toplevel_callbacks();
	}

	/* The messages seem unreliable; especially if we're being tricky */
	term_set_focus(term, GetForegroundWindow() == hwnd);

	if (pending_netevent)
	    enact_pending_netevent();