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
retrofit
[fanfix.git]
/
src
/
jexer
/
TApplication.java
diff --git
a/src/jexer/TApplication.java
b/src/jexer/TApplication.java
index dba59d7d7eaab7bc3f8f4c2e3f9866c1194ce713..8a338076d290fbaba784b7857864acfb6c4ccca4 100644
(file)
--- a/
src/jexer/TApplication.java
+++ b/
src/jexer/TApplication.java
@@
-164,16
+164,6
@@
public class TApplication implements Runnable {
*/
private int mouseY;
*/
private int mouseY;
- /**
- * Old version of mouse coordinate X.
- */
- private int oldMouseX;
-
- /**
- * Old version mouse coordinate Y.
- */
- private int oldMouseY;
-
/**
* Old drawn version of mouse coordinate X.
*/
/**
* Old drawn version of mouse coordinate X.
*/
@@
-1196,8
+1186,6
@@
public class TApplication implements Runnable {
}
mouseX = 0;
mouseY = 0;
}
mouseX = 0;
mouseY = 0;
- oldMouseX = 0;
- oldMouseY = 0;
}
if (desktop != null) {
desktop.setDimensions(0, desktopTop, resize.getWidth(),
}
if (desktop != null) {
desktop.setDimensions(0, desktopTop, resize.getWidth(),
@@
-1275,8
+1263,6
@@
public class TApplication implements Runnable {
}
if ((mouseX != mouse.getX()) || (mouseY != mouse.getY())) {
}
if ((mouseX != mouse.getX()) || (mouseY != mouse.getY())) {
- oldMouseX = mouseX;
- oldMouseY = mouseY;
mouseX = mouse.getX();
mouseY = mouse.getY();
} else {
mouseX = mouse.getX();
mouseY = mouse.getY();
} else {
@@
-1465,8
+1451,6
@@
public class TApplication implements Runnable {
TMouseEvent mouse = (TMouseEvent) event;
if ((mouseX != mouse.getX()) || (mouseY != mouse.getY())) {
TMouseEvent mouse = (TMouseEvent) event;
if ((mouseX != mouse.getX()) || (mouseY != mouse.getY())) {
- oldMouseX = mouseX;
- oldMouseY = mouseY;
mouseX = mouse.getX();
mouseY = mouse.getY();
} else {
mouseX = mouse.getX();
mouseY = mouse.getY();
} else {
@@
-1593,14
+1577,17
@@
public class TApplication implements Runnable {
desktop.onIdle();
}
desktop.onIdle();
}
- // Run any invokeLaters
+ // Run any invokeLaters. We make a copy, and run that, because one
+ // of these Runnables might add call TApplication.invokeLater().
+ List<Runnable> invokes = new ArrayList<Runnable>();
synchronized (invokeLaters) {
synchronized (invokeLaters) {
- for (Runnable invoke: invokeLaters) {
- invoke.run();
- }
+ invokes.addAll(invokeLaters);
invokeLaters.clear();
invokeLaters.clear();
- doRepaint();
}
}
+ for (Runnable invoke: invokes) {
+ invoke.run();
+ }
+ doRepaint();
}
}
@@
-2058,7
+2045,9
@@
public class TApplication implements Runnable {
// Draw the status bar of the top-level window
TStatusBar statusBar = null;
if (topLevel != null) {
// Draw the status bar of the top-level window
TStatusBar statusBar = null;
if (topLevel != null) {
- statusBar = topLevel.getStatusBar();
+ if (topLevel.isShown()) {
+ statusBar = topLevel.getStatusBar();
+ }
}
if (statusBar != null) {
getScreen().resetClipping();
}
if (statusBar != null) {
getScreen().resetClipping();