summaryrefslogtreecommitdiff
path: root/src/sigs.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-06-28 11:05:05 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-06-28 18:22:43 +0200
commitfec37db06bbbdff79bc9816046a76e0b29e173b4 (patch)
tree2b7a6349b3bc7dd8c22be72518bb4576040e9596 /src/sigs.c
parent6636232bc7bb3148ca82dcac3e52ce02212f4b68 (diff)
downloadcalcurse-fec37db06bbbdff79bc9816046a76e0b29e173b4.zip
Avoid redundant redraws on resize
Use a global flag to record whether the terminal was resized instead of redrawing everything each time a KEY_RESIZE is read. Add some additional checks to help_write_pad() as invalid actions may be passed now due to using signals instead of virtual key presses. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/sigs.c')
-rw-r--r--src/sigs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sigs.c b/src/sigs.c
index dabb1cb..a5f7e54 100644
--- a/src/sigs.c
+++ b/src/sigs.c
@@ -59,6 +59,7 @@ generic_hdlr (int sig)
;
break;
case SIGWINCH:
+ resize = 1;
clearok (curscr, TRUE);
(void)ungetch (KEY_RESIZE);
break;