Mercurial > 510Connectbot
diff src/com/five_ten_sg/connectbot/service/TerminalMonitor.java @ 424:09c1d3aae3f0
updateDirty before testChanged, try to eliminate sending duplicate screenChanged to the monitor
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 31 Oct 2014 12:40:09 -0700 |
parents | 651aff5a46c7 |
children | b284b8f9e535 |
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/service/TerminalMonitor.java Fri Oct 31 08:58:00 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/service/TerminalMonitor.java Fri Oct 31 12:40:09 2014 -0700 @@ -42,6 +42,21 @@ public static final char MONITOR_CMD_SWITCHSESSION = 10; public static final char MONITOR_CMD_CURSORREQUEST = 11; + public static final String[] commands = { + "cmd_init", + "cmd_activate", + "cmd_keystate", + "cmd_cursormove", + "cmd_screenchange", + "cmd_fieldvalue/setfield", + "cmd_getfield", + "cmd_screenwatch", + "cmd_depress", + "cmd_showurl", + "cmd_switchsession", + "cmd_cursorrequest" + }; + public static final char CURSOR_REQUESTED = 0; public static final char CURSOR_SCREEN_CHANGE = 1; public static final char CURSOR_USER_KEY = 2; @@ -330,8 +345,9 @@ if (monitor_out != null) { c[0] = (char)(c.length - 1); // number of chars following c[1] = cmd; - //Log.i(TAG, String.format("sending %d command", (int)cmd)); + Log.i(TAG, String.format("sending %s", commands[cmd])); monitor_out.write(charsToBytes(c)); + monitor_out.flush(); } else { c[1] = cmd;