about summary refs log tree commit diff stats
path: root/src/ui/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/core.c')
-rw-r--r--src/ui/core.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index ed21b233..254dd554 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -41,6 +41,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+
 #ifdef HAVE_LIBXSS
 #include <X11/extensions/scrnsaver.h>
 #endif
@@ -91,7 +94,6 @@ ui_init(void)
 {
     log_info("Initialising UI");
     initscr();
-    raw();
     keypad(stdscr, TRUE);
     if (prefs_get_boolean(PREF_MOUSE)) {
         mousemask(ALL_MOUSE_EVENTS, NULL);
@@ -221,9 +223,13 @@ ui_input_nonblocking(gboolean reset)
 void
 ui_resize(void)
 {
-    log_info("Resizing UI");
+    struct winsize w;
+    ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
     erase();
+    resizeterm(w.ws_row, w.ws_col);
     refresh();
+
+    log_info("Resizing UI");
     title_bar_resize();
     wins_resize_all();
     status_bar_resize();