~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Oops - that do-we-need-to-resize-window check failed to spot font changes
[sgt/putty]
/
window.c
diff --git
a/window.c
b/window.c
index
b9f509e
..
5dab8df
100644
(file)
--- a/
window.c
+++ b/
window.c
@@
-426,6
+426,7
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
caretbm = CreateBitmap(font_width, font_height, 1, 1, bits);
sfree(bits);
}
caretbm = CreateBitmap(font_width, font_height, 1, 1, bits);
sfree(bits);
}
+ CreateCaret(hwnd, caretbm, font_width, font_height);
/*
* Initialise the scroll bar.
/*
* Initialise the scroll bar.
@@
-1170,8
+1171,11
@@
static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
{
int prev_alwaysontop = cfg.alwaysontop;
int need_setwpos = FALSE;
{
int prev_alwaysontop = cfg.alwaysontop;
int need_setwpos = FALSE;
+ int old_fwidth, old_fheight;
cfg.width = cols;
cfg.height = rows;
cfg.width = cols;
cfg.height = rows;
+ old_fwidth = font_width;
+ old_fheight = font_height;
if (!do_reconfig(hwnd))
break;
just_reconfigged = TRUE;
if (!do_reconfig(hwnd))
break;
just_reconfigged = TRUE;
@@
-1249,6
+1253,8
@@
static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
if (cfg.height != rows ||
cfg.width != cols ||
if (cfg.height != rows ||
cfg.width != cols ||
+ old_fwidth != font_width ||
+ old_fheight != font_height ||
cfg.savelines != savelines)
need_setwpos = TRUE;
term_size(cfg.height, cfg.width, cfg.savelines);
cfg.savelines != savelines)
need_setwpos = TRUE;
term_size(cfg.height, cfg.width, cfg.savelines);
@@
-1398,7
+1404,7
@@
static LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
return 0;
case WM_SETFOCUS:
has_focus = TRUE;
return 0;
case WM_SETFOCUS:
has_focus = TRUE;
- CreateCaret(hwnd, caretbm,
0, 0
);
+ CreateCaret(hwnd, caretbm,
font_width, font_height
);
ShowCaret(hwnd);
compose_state = 0;
term_out();
ShowCaret(hwnd);
compose_state = 0;
term_out();