about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-08-20 23:54:41 +0100
committerJames Booth <boothj5@gmail.com>2013-08-20 23:54:41 +0100
commit3c39befa5e565bbc3cc13a0f060a8d7a18f735f1 (patch)
tree8d20c5175521492f79b4b811992724cec8131ff2 /src
parent770b572d583dad3b6176c1becf25afa5b0d2200a (diff)
downloadprofani-tty-3c39befa5e565bbc3cc13a0f060a8d7a18f735f1.tar.gz
Fixed window refresh on presence
Diffstat (limited to 'src')
-rw-r--r--src/ui/core.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index 37d0d35d..48e9ff03 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -472,8 +472,11 @@ ui_contact_online(const char * const barejid, const char * const resource,
     jid_destroy(jid);
     g_string_free(display_str, TRUE);
 
-    if (wins_is_current(window))
+    if (wins_is_current(console)) {
         wins_refresh_current();
+    } else if ((window != NULL) && (wins_is_current(window))) {
+        wins_refresh_current();
+    }
 }
 
 void
@@ -511,8 +514,11 @@ ui_contact_offline(const char * const from, const char * const show,
     jid_destroy(jidp);
     g_string_free(display_str, TRUE);
 
-    if (wins_is_current(window))
+    if (wins_is_current(console)) {
         wins_refresh_current();
+    } else if ((window != NULL) && (wins_is_current(window))) {
+        wins_refresh_current();
+    }
 }
 
 void