about summary refs log tree commit diff stats
path: root/src/ui/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index dd459ece..3a45ab01 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -132,11 +132,12 @@ win_create_chat(const char * const barejid)
     new_win->window.layout = _win_create_simple_layout();
 
     new_win->barejid = strdup(barejid);
-    new_win->resource = NULL;
+    new_win->resource_override = NULL;
     new_win->is_otr = FALSE;
     new_win->is_trusted = FALSE;
     new_win->history_shown = FALSE;
     new_win->unread = 0;
+    new_win->state = chat_state_new();
 
     new_win->memcheck = PROFCHATWIN_MEMCHECK;
 
@@ -333,7 +334,8 @@ win_free(ProfWin* window)
     if (window->type == WIN_CHAT) {
         ProfChatWin *chatwin = (ProfChatWin*)window;
         free(chatwin->barejid);
-        free(chatwin->resource);
+        free(chatwin->resource_override);
+        free(chatwin->state);
     }
 
     if (window->type == WIN_MUC) {
@@ -738,6 +740,8 @@ win_save_print(ProfWin *window, const char show_char, GTimeVal *tstamp,
 
     buffer_push(window->layout->buffer, show_char, time, flags, theme_item, from, message);
     _win_print(window, show_char, time, flags, theme_item, from, message);
+    // TODO: cross-reference.. this should be replaced by a real event-based system
+    ui_input_nonblocking(TRUE);
 }
 
 void
@@ -950,4 +954,4 @@ win_printline_nowrap(WINDOW *win, char *msg)
     waddnstr(win, msg, maxx);
 
     wmove(win, cury+1, 0);
-}
\ No newline at end of file
+}