X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FECMA48Terminal.java;h=d10437c1f49dd377bce18ac786b9ecfae3555357;hb=abb84744979f74e96ec604357895fc3130aec913;hp=afd153579e961c9637412a32faf73792394ac85f;hpb=d4bcb88c528504f04821e5c7b4c5e23b05843cb4;p=fanfix.git diff --git a/src/jexer/backend/ECMA48Terminal.java b/src/jexer/backend/ECMA48Terminal.java index afd1535..d10437c 100644 --- 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.event.TCommandEvent; import jexer.event.TInputEvent; import jexer.event.TKeypressEvent; import jexer.event.TMouseEvent; import jexer.event.TResizeEvent; +import static jexer.TCommand.*; import static jexer.TKeypress.*; /** @@ -1472,8 +1474,15 @@ public class ECMA48Terminal extends LogicalScreen } } // 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(); }