diff src/org/tn5250j/framework/tn5250/tnvt.java @ 216:cd07c1648016

test buffer changed when 5250 keyboard unlocks
author Carl Byington <carl@five-ten-sg.com>
date Tue, 08 Jul 2014 10:02:11 -0700
parents 2d93d5063e3d
children 1048515a2852
line wrap: on
line diff
--- a/src/org/tn5250j/framework/tn5250/tnvt.java	Mon Jul 07 15:13:32 2014 -0700
+++ b/src/org/tn5250j/framework/tn5250/tnvt.java	Tue Jul 08 10:02:11 2014 -0700
@@ -985,7 +985,7 @@
                 Object e = dsq.take();
 
                 if ((e instanceof Integer) && ((Integer)e == 0)) {
-                    buffer.testChanged();
+                    //buffer.testChanged();
                     continue;
                 };
 
@@ -997,15 +997,10 @@
                 continue;
             }
 
-            // lets play nicely with the others on the playground
-            //         me.yield();
-            Thread.yield();
             invited = false;
             screen52.setCursorActive(false);
 
-            //      System.out.println("operation code: " + bk.getOpCode());
-            if (bk == null)
-                continue;
+            if (bk == null) continue;
 
             switch (bk.getOpCode()) {
                 case 00:
@@ -1015,10 +1010,10 @@
                 case 1:
                     Log.d(TAG, "Invite Operation");
                     parseIncoming();
-                    //               screen52.setKeyboardLocked(false);
                     pendingUnlock = true;
                     cursorOn = true;
                     setInvited();
+                    buffer.testChanged();
                     break;
 
                 case 2:
@@ -1121,9 +1116,6 @@
                 cursorOn = false;
             }
 
-            // lets play nicely with the others on the playground
-            //me.yield();
-            Thread.yield();
         }
     }
 
@@ -2254,8 +2246,7 @@
     private final void writeErrorCodeToWindow() throws Exception {
         int fromCol = bk.getNextByte() & 0xff; // from column
         int toCol = bk.getNextByte() & 0xff; // to column
-        screen52.setCursor(screen52.getErrorLine(), fromCol); // Skip the control
-        // byte
+        screen52.setCursor(screen52.getErrorLine(), fromCol); // Skip the control byte
         screen52.setStatus(Screen5250.STATUS_ERROR_CODE,
                            Screen5250.STATUS_VALUE_ON, null);
         screen52.saveErrorLine();