Obtaining the new window size using TIOCGWINSZ and setting it using
resize_term(), so getmaxyx() reports the actual terminal size.
Signed-off-by: Benjamin Abendroth <braph93@gmx.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
#include "aconfig.h"
#include <stdlib.h>
#include <term.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
#include "die.h"
#include "widget.h"
{
PANEL *panel, *below;
const struct widget *widget;
+ struct winsize size;
+
+ if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &size) == 0)
+ resize_term(size.ws_row, size.ws_col);
getmaxyx(stdscr, screen_lines, screen_cols);
if (tigetflag("xenl") != 1 && tigetflag("am") != 1)