about summary refs log tree commit diff stats
path: root/src/ui/windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/windows.c')
-rw-r--r--src/ui/windows.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/ui/windows.c b/src/ui/windows.c
index 03e09726..0542f3da 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -294,7 +294,7 @@ wins_resize_all(void)
     GList *curr = values;
     while (curr != NULL) {
         ProfWin *window = curr->data;
-        if (window->type == WIN_MUC) {
+        if ((window->type == WIN_MUC) && (window->subwin)) {
             wresize(window->win, PAD_SIZE, (cols/OCCUPANT_WIN_RATIO) * (OCCUPANT_WIN_RATIO-1));
         } else {
             wresize(window->win, PAD_SIZE, cols);
@@ -320,12 +320,28 @@ wins_hide_subwin(ProfWin *window)
     getmaxyx(stdscr, rows, cols);
 
     win_hide_subwin(window);
+
     ProfWin *current_win = wins_get_current();
     if (current_win->type == WIN_MUC) {
         pnoutrefresh(current_win->win, current_win->y_pos, 0, 1, 0, rows-3, cols-1);
     }
 }
 
+void
+wins_show_subwin(ProfWin *window)
+{
+    int rows, cols;
+    getmaxyx(stdscr, rows, cols);
+
+    win_show_subwin(window);
+
+    ProfWin *current_win = wins_get_current();
+    if (current_win->type == WIN_MUC) {
+        pnoutrefresh(current_win->win, current_win->y_pos, 0, 1, 0, rows-3, ((cols/OCCUPANT_WIN_RATIO) * (OCCUPANT_WIN_RATIO-1)) -1);
+        pnoutrefresh(current_win->subwin, current_win->sub_y_pos, 0, 1, (cols/OCCUPANT_WIN_RATIO) * (OCCUPANT_WIN_RATIO-1), rows-3, cols-1);
+    }
+}
+
 gboolean
 wins_duck_exists(void)
 {