projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Slight improvement to cursor blink timing: since the cursor doesn't
[u/mdw/putty]
/
windows
/
window.c
diff --git
a/windows/window.c
b/windows/window.c
index
b460b53
..
6b7fc17
100644
(file)
--- a/
windows/window.c
+++ b/
windows/window.c
@@
-770,7
+770,7
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
logpal = NULL;
init_palette();
logpal = NULL;
init_palette();
- term
->has_focus = (
GetForegroundWindow() == hwnd);
+ term
_set_focus(term,
GetForegroundWindow() == hwnd);
UpdateWindow(hwnd);
if (GetMessage(&msg, NULL, 0, 0) == 1) {
UpdateWindow(hwnd);
if (GetMessage(&msg, NULL, 0, 0) == 1) {
@@
-787,7
+787,7
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
continue;
/* The messages seem unreliable; especially if we're being tricky */
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();
net_pending_errors();
@@
-2317,7
+2317,7
@@
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
net_pending_errors();
return 0;
case WM_SETFOCUS:
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 */
CreateCaret(hwnd, caretbm, font_width, font_height);
ShowCaret(hwnd);
flash_window(0); /* stop */
@@
-2326,7
+2326,7
@@
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
break;
case WM_KILLFOCUS:
show_mouseptr(1);
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);
DestroyCaret();
caret_x = caret_y = -1; /* ensure caret is replaced next time */
term_update(term);