Index: functions.c
===================================================================
--- functions.c	(revision 385fda9097ab29cf4e27521044d9ef69107110c0)
+++ functions.c	(revision 40d1eef7d56f2eb33ef82989035ed476e1208c32)
@@ -1250,9 +1250,5 @@
 void owl_function_full_redisplay(void)
 {
-  touchwin(owl_global_get_curs_recwin(&g));
-
-  sepbar_dirty();
-
-  owl_global_set_needrefresh(&g);
+  /* FIXME: this maybe should do something; dirty every window? */
 }
 
Index: global.c
===================================================================
--- global.c	(revision 385fda9097ab29cf4e27521044d9ef69107110c0)
+++ global.c	(revision 40d1eef7d56f2eb33ef82989035ed476e1208c32)
@@ -82,5 +82,4 @@
 
   owl_mainpanel_init(&(g->mainpanel));
-  _owl_global_setup_windows(g);
 
   /* Fill in some variables which don't have constant defaults */
@@ -95,5 +94,5 @@
 
   owl_messagelist_create(&(g->msglist));
-  owl_mainwin_init(&(g->mw));
+  owl_mainwin_init(&(g->mw), g->mainpanel.recwin);
   owl_popwin_init(&(g->pw));
   owl_msgwin_init(&(g->msgwin), g->mainpanel.msgwin);
@@ -159,16 +158,4 @@
     *pan = new_panel(win);
   }
-}
-
-void _owl_global_setup_windows(owl_global *g) {
-  int cols, recwinlines;
-
-  cols=g->cols;
-
-  recwinlines = owl_global_get_recwin_lines(g);
-
-  /* create the new windows */
-  _owl_panel_set_window(&g->recpan, newwin(recwinlines, cols, 0, 0));
-  _owl_panel_set_window(&g->seppan, newwin(1, cols, recwinlines, 0));
 }
 
@@ -289,8 +276,4 @@
 
 /* curses windows */
-
-WINDOW *owl_global_get_curs_recwin(const owl_global *g) {
-  return panel_window(g->recpan);
-}
 
 owl_window *owl_global_get_curs_sepwin(const owl_global *g) {
@@ -508,7 +491,4 @@
   owl_function_debugmsg("Relayouting...");
 
-  /* re-initialize the windows */
-  _owl_global_setup_windows(g);
-
   /* in case any styles rely on the current width */
   owl_messagelist_invalidate_formats(owl_global_get_msglist(g));
Index: mainwin.c
===================================================================
--- mainwin.c	(revision f449096479541df1434d1d796890d0bd2939f072)
+++ mainwin.c	(revision 40d1eef7d56f2eb33ef82989035ed476e1208c32)
@@ -1,11 +1,20 @@
 #include "owl.h"
 
-void owl_mainwin_init(owl_mainwin *mw)
+static void owl_mainwin_redraw(owl_window *w, WINDOW *recwin, void *user_data);
+
+void owl_mainwin_init(owl_mainwin *mw, owl_window *window)
 {
   mw->curtruncated=0;
   mw->lastdisplayed=-1;
+  mw->window = g_object_ref(window);
+  g_signal_connect(window, "redraw", G_CALLBACK(owl_mainwin_redraw), mw);
 }
 
 void owl_mainwin_redisplay(owl_mainwin *mw)
+{
+  owl_window_dirty(mw->window);
+}
+
+static void owl_mainwin_redraw(owl_window *w, WINDOW *recwin, void *user_data)
 {
   owl_message *m;
@@ -13,10 +22,9 @@
   int x, y, savey, recwinlines, start;
   int topmsg, curmsg, markedmsgid, fgcolor, bgcolor;
-  WINDOW *recwin;
   const owl_view *v;
   GList *fl;
   const owl_filter *f;
+  owl_mainwin *mw = user_data;
 
-  recwin = owl_global_get_curs_recwin(&g);
   topmsg = owl_global_get_topmsg(&g);
   curmsg = owl_global_get_curmsg(&g);
@@ -88,5 +96,5 @@
     if (y+lines > recwinlines-1) {
       isfull=1;
-      owl_message_curs_waddstr(m, owl_global_get_curs_recwin(&g),
+      owl_message_curs_waddstr(m, recwin,
 			       start,
 			       start+recwinlines-y,
@@ -96,5 +104,5 @@
     } else {
       /* otherwise print the whole thing */
-      owl_message_curs_waddstr(m, owl_global_get_curs_recwin(&g),
+      owl_message_curs_waddstr(m, recwin,
 			       start,
 			       start+lines,
@@ -139,6 +147,4 @@
   }
   mw->lastdisplayed=i-1;
-
-  owl_global_set_needrefresh(&g);
 }
 
Index: owl.h
===================================================================
--- owl.h	(revision f3a9d4dd3ad1d729525546db7fbfbf0afebe551d)
+++ owl.h	(revision 40d1eef7d56f2eb33ef82989035ed476e1208c32)
@@ -396,4 +396,5 @@
   int lasttruncated;
   int lastdisplayed;
+  owl_window *window;
 } owl_mainwin;
 
@@ -587,5 +588,4 @@
   owl_mainpanel mainpanel;
   gulong typwin_erase_id;
-  PANEL *recpan, *seppan;
   int needrefresh;
   int rightshift;
