*/
private Thread readerThread;
+ /**
+ * The last reported mouse X position.
+ */
+ private int oldMouseX = -1;
+
+ /**
+ * The last reported mouse Y position.
+ */
+ private int oldMouseY = -1;
+
/**
* true if mouse1 was down. Used to report mouse1 on the release event.
*/
System.err.printf(" ctrl: %s\n", ctrl);
System.err.printf(" shift: %s\n", shift);
System.err.printf(" ch: %s\n", ch);
- */
+ */
// Special case: not return the bare modifier presses
switch (key.getKeyCode()) {
case 0x0D:
keypress = kbEnter;
break;
+ case 0x09:
+ keypress = kbTab;
+ break;
case 0x7F:
keypress = kbDel;
break;
*/
@Override
public void windowActivated(final WindowEvent event) {
- // Ignore
+ // Force a total repaint
+ synchronized (screen) {
+ screen.clearPhysical();
+ }
}
/**
public void mouseMoved(final MouseEvent mouse) {
int x = screen.textColumn(mouse.getX());
int y = screen.textRow(mouse.getY());
+ if ((x == oldMouseX) && (y == oldMouseY)) {
+ // Bail out, we've moved some pixels but not a whole text cell.
+ return;
+ }
+ oldMouseX = x;
+ oldMouseY = y;
+
TMouseEvent mouseEvent = new TMouseEvent(TMouseEvent.Type.MOUSE_MOTION,
x, y, x, y, mouse1, mouse2, mouse3, false, false);