git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
#38 notify backend of lost connection, version bump to 0.3.1
[fanfix.git]
/
src
/
jexer
/
backend
/
ECMA48Terminal.java
diff --git
a/src/jexer/backend/ECMA48Terminal.java
b/src/jexer/backend/ECMA48Terminal.java
index 92758ee6a65e096072af59d53c5bca973f8469c0..d10437c1f49dd377bce18ac786b9ecfae3555357 100644
(file)
--- a/
src/jexer/backend/ECMA48Terminal.java
+++ b/
src/jexer/backend/ECMA48Terminal.java
@@
-50,10
+50,12
@@
import jexer.TImage;
import jexer.bits.Cell;
import jexer.bits.CellAttributes;
import jexer.bits.Color;
import jexer.bits.Cell;
import jexer.bits.CellAttributes;
import jexer.bits.Color;
+import jexer.event.TCommandEvent;
import jexer.event.TInputEvent;
import jexer.event.TKeypressEvent;
import jexer.event.TMouseEvent;
import jexer.event.TResizeEvent;
import jexer.event.TInputEvent;
import jexer.event.TKeypressEvent;
import jexer.event.TMouseEvent;
import jexer.event.TResizeEvent;
+import static jexer.TCommand.*;
import static jexer.TKeypress.*;
/**
import static jexer.TKeypress.*;
/**
@@
-1472,10
+1474,17
@@
public class ECMA48Terminal extends LogicalScreen
}
} // while ((done == false) && (stopReaderThread == false))
}
} // while ((done == false) && (stopReaderThread == false))
- // TODO: pass an event up to TApplication to tell it this Backend is
- // done.
+ // Pass an event up to TApplication to tell it this Backend is done.
+ synchronized (eventQueue) {
+ eventQueue.add(new TCommandEvent(cmBackendDisconnect));
+ }
+ if (listener != null) {
+ synchronized (listener) {
+ listener.notifyAll();
+ }
+ }
- System.err.println("*** run() exiting..."); System.err.flush();
+
//
System.err.println("*** run() exiting..."); System.err.flush();
}
// ------------------------------------------------------------------------
}
// ------------------------------------------------------------------------