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
TWindowBackend
[fanfix.git]
/
src
/
jexer
/
backend
/
ECMA48Terminal.java
diff --git
a/src/jexer/backend/ECMA48Terminal.java
b/src/jexer/backend/ECMA48Terminal.java
index 6303f4fc8d0f5240c1287d42bd9876e04cc0222c..78aae45c63b315d2c40a340f60071dbdd527f0be 100644
(file)
--- a/
src/jexer/backend/ECMA48Terminal.java
+++ b/
src/jexer/backend/ECMA48Terminal.java
@@
-352,6
+352,11
@@
public final class ECMA48Terminal extends LogicalScreen
this.output.printf("%s%s", mouse(true), xtermMetaSendsEscape(true));
this.output.flush();
this.output.printf("%s%s", mouse(true), xtermMetaSendsEscape(true));
this.output.flush();
+ // Query the screen size
+ sessionInfo.queryWindowSize();
+ setDimensions(sessionInfo.getWindowWidth(),
+ sessionInfo.getWindowHeight());
+
// Hang onto the window size
windowResize = new TResizeEvent(TResizeEvent.Type.SCREEN,
sessionInfo.getWindowWidth(), sessionInfo.getWindowHeight());
// Hang onto the window size
windowResize = new TResizeEvent(TResizeEvent.Type.SCREEN,
sessionInfo.getWindowWidth(), sessionInfo.getWindowHeight());
@@
-360,6
+365,8
@@
public final class ECMA48Terminal extends LogicalScreen
if (System.getProperty("jexer.ECMA48.rgbColor") != null) {
if (System.getProperty("jexer.ECMA48.rgbColor").equals("true")) {
doRgbColor = true;
if (System.getProperty("jexer.ECMA48.rgbColor") != null) {
if (System.getProperty("jexer.ECMA48.rgbColor").equals("true")) {
doRgbColor = true;
+ } else {
+ doRgbColor = false;
}
}
}
}
@@
-368,10
+375,6
@@
public final class ECMA48Terminal extends LogicalScreen
readerThread = new Thread(this);
readerThread.start();
readerThread = new Thread(this);
readerThread.start();
- // Query the screen size
- setDimensions(sessionInfo.getWindowWidth(),
- sessionInfo.getWindowHeight());
-
// Clear the screen
this.output.write(clearAll());
this.output.flush();
// Clear the screen
this.output.write(clearAll());
this.output.flush();
@@
-439,6
+442,11
@@
public final class ECMA48Terminal extends LogicalScreen
this.output.printf("%s%s", mouse(true), xtermMetaSendsEscape(true));
this.output.flush();
this.output.printf("%s%s", mouse(true), xtermMetaSendsEscape(true));
this.output.flush();
+ // Query the screen size
+ sessionInfo.queryWindowSize();
+ setDimensions(sessionInfo.getWindowWidth(),
+ sessionInfo.getWindowHeight());
+
// Hang onto the window size
windowResize = new TResizeEvent(TResizeEvent.Type.SCREEN,
sessionInfo.getWindowWidth(), sessionInfo.getWindowHeight());
// Hang onto the window size
windowResize = new TResizeEvent(TResizeEvent.Type.SCREEN,
sessionInfo.getWindowWidth(), sessionInfo.getWindowHeight());
@@
-447,6
+455,8
@@
public final class ECMA48Terminal extends LogicalScreen
if (System.getProperty("jexer.ECMA48.rgbColor") != null) {
if (System.getProperty("jexer.ECMA48.rgbColor").equals("true")) {
doRgbColor = true;
if (System.getProperty("jexer.ECMA48.rgbColor") != null) {
if (System.getProperty("jexer.ECMA48.rgbColor").equals("true")) {
doRgbColor = true;
+ } else {
+ doRgbColor = false;
}
}
}
}
@@
-455,10
+465,6
@@
public final class ECMA48Terminal extends LogicalScreen
readerThread = new Thread(this);
readerThread.start();
readerThread = new Thread(this);
readerThread.start();
- // Query the screen size
- setDimensions(sessionInfo.getWindowWidth(),
- sessionInfo.getWindowHeight());
-
// Clear the screen
this.output.write(clearAll());
this.output.flush();
// Clear the screen
this.output.write(clearAll());
this.output.flush();
@@
-1892,8
+1898,10
@@
public final class ECMA48Terminal extends LogicalScreen
synchronized (eventQueue) {
eventQueue.addAll(events);
}
synchronized (eventQueue) {
eventQueue.addAll(events);
}
- synchronized (listener) {
- listener.notifyAll();
+ if (listener != null) {
+ synchronized (listener) {
+ listener.notifyAll();
+ }
}
events.clear();
}
}
events.clear();
}
@@
-1905,8
+1913,10
@@
public final class ECMA48Terminal extends LogicalScreen
eventQueue.addAll(events);
}
events.clear();
eventQueue.addAll(events);
}
events.clear();
- synchronized (listener) {
- listener.notifyAll();
+ if (listener != null) {
+ synchronized (listener) {
+ listener.notifyAll();
+ }
}
}
}
}