Diff

Differences From Artifact [ad7ab60a3e]:

To Artifact [1d48edb3a9]:


766
767
768
769
770
771
772
773

774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790

791
792
793
794
795
796
797
766
767
768
769
770
771
772

773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789

790
791
792
793
794
795
796
797







-
+
















-
+







    /*
     * Set the palette up.
     */
    pal = NULL;
    logpal = NULL;
    init_palette();

    term->has_focus = (GetForegroundWindow() == hwnd);
    term_set_focus(term, GetForegroundWindow() == hwnd);
    UpdateWindow(hwnd);

    if (GetMessage(&msg, NULL, 0, 0) == 1) {
	while (msg.message != WM_QUIT) {
	    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 (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
		continue;

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

	    net_pending_errors();

	    /* There's no point rescanning everything in the message queue
	     * so we do an apparently unnecessary wait here
	     */
	    WaitMessage();
2313
2314
2315
2316
2317
2318
2319
2320

2321
2322
2323
2324
2325
2326
2327
2328
2329

2330
2331
2332
2333
2334
2335
2336
2313
2314
2315
2316
2317
2318
2319

2320
2321
2322
2323
2324
2325
2326
2327
2328

2329
2330
2331
2332
2333
2334
2335
2336







-
+








-
+







	}
	return 0;
      case WM_NETEVENT:
	enact_netevent(wParam, lParam);
	net_pending_errors();
	return 0;
      case WM_SETFOCUS:
	term->has_focus = TRUE;
	term_set_focus(term, TRUE);
	CreateCaret(hwnd, caretbm, font_width, font_height);
	ShowCaret(hwnd);
	flash_window(0);	       /* stop */
	compose_state = 0;
	term_update(term);
	break;
      case WM_KILLFOCUS:
	show_mouseptr(1);
	term->has_focus = FALSE;
	term_set_focus(term, FALSE);
	DestroyCaret();
	caret_x = caret_y = -1;	       /* ensure caret is replaced next time */
	term_update(term);
	break;
      case WM_ENTERSIZEMOVE:
#ifdef RDB_DEBUG_PATCH
	debug((27, "WM_ENTERSIZEMOVE"));