about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-04-30 22:43:08 +0100
committerJames Booth <boothj5@gmail.com>2015-04-30 22:43:08 +0100
commite11e55e31abced2f4e7fa332298485562adaf1ef (patch)
tree90ffc085585e311c4a6bef82f48f2b1e572e86e9 /src/command
parentd68fb25ddef2f30c9d17991aa5d1d0e2a36d8386 (diff)
downloadprofani-tty-e11e55e31abced2f4e7fa332298485562adaf1ef.tar.gz
Move current win check to event, removed next and prev win functions
Diffstat (limited to 'src/command')
-rw-r--r--src/command/commands.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index ad8c276c..62dcb927 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -727,9 +727,7 @@ cmd_win(gchar **args, struct cmd_help_t help)
     if (!window) {
         cons_show("Window %d does not exist.", num);
     } else {
-        if (!wins_is_current(window)) {
-            ui_ev_focus_win(window);
-        }
+        ui_ev_focus_win(window);
     }
 
     return TRUE;
@@ -1337,9 +1335,7 @@ cmd_msg(gchar **args, struct cmd_help_t help)
         if (!chatwin) {
             chatwin = ui_ev_new_chat_win(barejid);
         }
-        if (!wins_is_current((ProfWin*)chatwin)) {
-            ui_ev_focus_win((ProfWin*)chatwin);
-        }
+        ui_ev_focus_win((ProfWin*)chatwin);
 
         if (msg) {
             cl_ev_send_msg(chatwin, msg);
@@ -4175,9 +4171,7 @@ cmd_otr(gchar **args, struct cmd_help_t help)
             if (!chatwin) {
                 chatwin = ui_ev_new_chat_win(barejid);
             }
-            if (!wins_is_current((ProfWin*)chatwin)) {
-                ui_ev_focus_win((ProfWin*)chatwin);
-            }
+            ui_ev_focus_win((ProfWin*)chatwin);
 
             if (ui_current_win_is_otr()) {
                 ui_current_print_formatted_line('!', 0, "You are already in an OTR session.");