summaryrefslogtreecommitdiff
path: root/macros/texinfo/texinfo/info/pcterm.c
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-04 03:01:24 +0000
committerNorbert Preining <norbert@preining.info>2021-07-04 03:01:24 +0000
commit7994f86ec5e18f9d0d9f90161a2f26dd26d26af7 (patch)
tree88edb7d1a1aed3183a1350202c898716b4ac59ce /macros/texinfo/texinfo/info/pcterm.c
parent03fa062b03ce2bb5385f8f30888f94d441fa5cb4 (diff)
CTAN sync 202107040301
Diffstat (limited to 'macros/texinfo/texinfo/info/pcterm.c')
-rw-r--r--macros/texinfo/texinfo/info/pcterm.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/macros/texinfo/texinfo/info/pcterm.c b/macros/texinfo/texinfo/info/pcterm.c
index 57520466dc..aeccb76f29 100644
--- a/macros/texinfo/texinfo/info/pcterm.c
+++ b/macros/texinfo/texinfo/info/pcterm.c
@@ -709,17 +709,24 @@ w32_kbd_read (unsigned char *inbuf, size_t n)
{
int rows, cols;
- /* Note: this event is only sent when the console
- window's _screen_buffer_ size is changed via
- the Properties->Layout dialog. */
+ /* Note: this event is _supposed_ to be sent only
+ when the console window's _screen_buffer_ size
+ is changed via the Properties->Layout dialog.
+ However, Windows 10 seems to send it even when
+ the properties are not changed. */
cols = inrec.Event.WindowBufferSizeEvent.dwSize.X;
rows = inrec.Event.WindowBufferSizeEvent.dwSize.Y;
- screenwidth = cols;
- screenheight = rows;
- w32_set_screen_dimensions (cols, rows);
- display_initialize_display (screenwidth, screenheight);
- window_new_screen_size (screenwidth, screenheight);
- redisplay_after_signal ();
+ /* Avoid needless screen redraws, they produce
+ annoying flickering. */
+ if (cols != screenwidth || rows != screenheight)
+ {
+ screenwidth = cols;
+ screenheight = rows;
+ w32_set_screen_dimensions (cols, rows);
+ display_initialize_display (screenwidth, screenheight);
+ window_new_screen_size (screenwidth, screenheight);
+ redisplay_after_signal ();
+ }
}
break;
case MOUSE_EVENT: