diff --git a/alsamixer/widget.c b/alsamixer/widget.c index 464f440..6f1644a 100644 --- a/alsamixer/widget.c +++ b/alsamixer/widget.c @@ -19,6 +19,8 @@ #include "aconfig.h" #include #include +#include +#include #include "die.h" #include "widget.h" @@ -127,6 +129,10 @@ void window_size_changed(void) { 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)