summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-05-11 17:35:38 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-05-11 17:35:38 +0000
commitf89d89b0e75db019e48299fa112ac4086bd216ef (patch)
tree6169f1a818ece2f28cdca92a54bdb1ce666a71b1
parent749e70cad6817a75275b8ef43831d612543272a4 (diff)
downloadirssi-f89d89b0e75db019e48299fa112ac4086bd216ef.zip
statusbar was a bit broken when using split windows
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1487 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/fe-text/statusbar-items.c1
-rw-r--r--src/fe-text/statusbar.c7
-rw-r--r--src/fe-text/statusbar.h4
3 files changed, 12 insertions, 0 deletions
diff --git a/src/fe-text/statusbar-items.c b/src/fe-text/statusbar-items.c
index 3b21d11b..137e7417 100644
--- a/src/fe-text/statusbar-items.c
+++ b/src/fe-text/statusbar-items.c
@@ -596,6 +596,7 @@ static void sig_mainwindow_created(MAIN_WINDOW_REC *window)
window->statusbar =
statusbar_create(STATUSBAR_POS_MIDDLE,
window->first_line+window->height);
+ ((STATUSBAR_REC *) window->statusbar)->window = window;
sidebar_add_items(window);
}
diff --git a/src/fe-text/statusbar.c b/src/fe-text/statusbar.c
index 2404c1a1..8e99c4fe 100644
--- a/src/fe-text/statusbar.c
+++ b/src/fe-text/statusbar.c
@@ -133,9 +133,14 @@ static void statusbar_get_sizes(STATUSBAR_REC *bar, int max_width)
static void statusbar_redraw_line(STATUSBAR_REC *bar)
{
+ WINDOW_REC *old_active_win;
GSList *tmp;
int xpos, rxpos;
+ old_active_win = active_win;
+ if (bar->window != NULL)
+ active_win = bar->window->active;
+
statusbar_get_sizes(bar, COLS-2);
xpos = 1;
@@ -159,6 +164,8 @@ static void statusbar_redraw_line(STATUSBAR_REC *bar)
rec->func(rec, FALSE);
}
}
+
+ active_win = old_active_win;
}
static void statusbar_redraw_all(void)
diff --git a/src/fe-text/statusbar.h b/src/fe-text/statusbar.h
index 5a00eaa7..32d35b82 100644
--- a/src/fe-text/statusbar.h
+++ b/src/fe-text/statusbar.h
@@ -1,6 +1,8 @@
#ifndef __STATUSBAR_H
#define __STATUSBAR_H
+#include "mainwindows.h"
+
#define SBAR_PRIORITY_HIGH 100
#define SBAR_PRIORITY_NORMAL 0
#define SBAR_PRIORITY_LOW -100
@@ -15,6 +17,8 @@ typedef struct SBAR_ITEM_REC SBAR_ITEM_REC;
typedef void (*STATUSBAR_FUNC) (SBAR_ITEM_REC *item, int get_size_only);
typedef struct {
+ MAIN_WINDOW_REC *window;
+
int pos;
int line;