From 4eee9482aeaa92aa1199b5d6ca4141afdf5f0791 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Fri, 4 Jun 2010 16:52:22 -0400 Subject: [PATCH] Eugh. Create the sepwin before the recwin The sepwin depends on a value computed by the recwin's draw handler. This is kinda nasty... --- doc/owl-window.txt | 5 +++++ mainpanel.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/owl-window.txt b/doc/owl-window.txt index 90068aabd..a0303fa85 100644 --- a/doc/owl-window.txt +++ b/doc/owl-window.txt @@ -174,3 +174,8 @@ Known issues and notes ids. This is somewhat a side effect of us not using GObject everywhere; the signals can automatically disconnect in the right contexts if we do. + +- The sepbar depends on a value computed while the mainwin is drawn, + so we currently ensure the windows are created in the right order + for the repaints to occur correctly. This is rather poor and should + be refactored later. diff --git a/mainpanel.c b/mainpanel.c index 45e3644e4..73f2cb9e5 100644 --- a/mainpanel.c +++ b/mainpanel.c @@ -4,8 +4,10 @@ void owl_mainpanel_init(owl_mainpanel *mp) { /* Create windows */ mp->panel = owl_window_new(NULL); - mp->recwin = owl_window_new(mp->panel); + /* HACK for now: the sepwin must be drawn /after/ the recwin for + * lastdisplayed to work */ mp->sepwin = owl_window_new(mp->panel); + mp->recwin = owl_window_new(mp->panel); mp->msgwin = owl_window_new(mp->panel); mp->typwin = owl_window_new(mp->panel);