commit fca25c8729b71a65f08d3539a4eb9bdd8558a6e0
parent 5c54d29a9af96aef1188ddcfadde479c95f6e89c
Author: Wim Dupont <wim@wimdupont.com>
Date: Sat, 4 Apr 2026 23:07:45 +0200
fixes
Diffstat:
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
@@ -5,11 +5,11 @@ SRC = scal.c
OBJ = ${SRC:.c=.o}
MAN1 = ${BIN:=.1}
-${OBJ}: config.h
-
all: ${BIN}
-LDFLAGS=-lncurses
+${OBJ}: config.h
+
+LDFLAGS += -lncurses
.c.o:
$(CC) -g -c $(CFLAGS) $<
diff --git a/scal.c b/scal.c
@@ -130,11 +130,13 @@ resize(void)
getmaxyx(stdscr, maxy, maxx);
+ if (wwin) delwin(wwin);
wmaxy = maxy - BORDER_SPACE_SIZE;
wmaxx = maxx/5 - BORDER_SPACE_SIZE > 0 ? maxx/5 - BORDER_SPACE_SIZE : 1;
startx = maxx > BORDER_SPACE_SIZE ? BORDER_SPACE_SIZE : 0;
wwin = newwin(wmaxy, wmaxx, BORDER_SPACE_SIZE, startx);
+ if (vwin) delwin(vwin);
vmaxy = maxy - BORDER_SPACE_SIZE;
vmaxx = maxx - wmaxx - BORDER_SPACE_SIZE;
startx = wmaxx + BORDER_SPACE_SIZE;