$OpenBSD: patch-src_screen_c,v 1.1 2008/07/21 07:53:03 bernd Exp $
--- src/screen.c.orig	Wed Sep 19 19:27:39 2007
+++ src/screen.c	Sat Jul 12 10:53:09 2008
@@ -23,6 +23,7 @@
 #include <stdarg.h>
 #include <string.h>
 #include <time.h>
+#include <termios.h>
 #include <locale.h>
 #include <glib.h>
 #include <ncurses.h>
@@ -449,13 +450,22 @@ void
 screen_resize(void)
 {
   gint i;
+  struct winsize ws;
 
+  if (ioctl(fileno(stdout), TIOCGWINSZ, &ws) == 0) {
+	  LINES = ws.ws_row;
+	  COLS = ws.ws_col;
+  }
+
   D("Resize rows %d->%d, cols %d->%d\n",screen->rows,LINES,screen->cols,COLS);
   if( COLS<SCREEN_MIN_COLS || LINES<SCREEN_MIN_ROWS )
     {
-      screen_exit();
-      fprintf(stderr, _("Error: Screen to small!\n"));
-      exit(EXIT_FAILURE);
+      /*
+       * Do not resize under a certain minimum, because that will fuck up the
+       * playlist amongst other things
+       */
+      LINES = SCREEN_MIN_ROWS;
+      COLS = SCREEN_MIN_COLS;
     }
 
   resizeterm(LINES, COLS);
