X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FTWindowBackend.java;h=10f95c666da3dc8c545dbf409d8778f683fb04c8;hb=00691e80f2f135f92be739e2b7e86775a2357276;hp=0a042336dcda9bdecc092814d75e0454f1ac42c7;hpb=3cb993369fa76b6e9fd8ef19db3366349a09a678;p=fanfix.git diff --git a/src/jexer/backend/TWindowBackend.java b/src/jexer/backend/TWindowBackend.java index 0a04233..10f95c6 100644 --- a/src/jexer/backend/TWindowBackend.java +++ b/src/jexer/backend/TWindowBackend.java @@ -73,16 +73,6 @@ public class TWindowBackend extends TWindow implements Backend { */ private Screen otherScreen; - /** - * The mouse X position as seen on the other screen. - */ - private int otherMouseX = -1; - - /** - * The mouse Y position as seen on the other screen. - */ - private int otherMouseY = -1; - /** * The session information. */ @@ -114,6 +104,7 @@ public class TWindowBackend extends TWindow implements Backend { otherScreen = new LogicalScreen(); otherScreen.setDimensions(width - 2, height - 2); drawLock = otherScreen; + setHiddenMouse(true); } /** @@ -139,6 +130,7 @@ public class TWindowBackend extends TWindow implements Backend { otherScreen = new LogicalScreen(); otherScreen.setDimensions(width - 2, height - 2); drawLock = otherScreen; + setHiddenMouse(true); } /** @@ -165,6 +157,7 @@ public class TWindowBackend extends TWindow implements Backend { otherScreen = new LogicalScreen(); otherScreen.setDimensions(width - 2, height - 2); drawLock = otherScreen; + setHiddenMouse(true); } /** @@ -193,6 +186,7 @@ public class TWindowBackend extends TWindow implements Backend { otherScreen = new LogicalScreen(); otherScreen.setDimensions(width - 2, height - 2); drawLock = otherScreen; + setHiddenMouse(true); } // ------------------------------------------------------------------------ @@ -275,17 +269,12 @@ public class TWindowBackend extends TWindow implements Backend { event.setY(mouse.getY() - 1); event.setAbsoluteX(event.getX()); event.setAbsoluteY(event.getY()); - otherMouseX = event.getX() + getX() + 1; - otherMouseY = event.getY() + getY() + 1; synchronized (eventQueue) { eventQueue.add(event); } synchronized (listener) { listener.notifyAll(); } - } else { - otherMouseX = -1; - otherMouseY = -1; } super.onMouseMotion(mouse); } @@ -329,17 +318,6 @@ public class TWindowBackend extends TWindow implements Backend { } } - // If the mouse pointer is over the other window, draw its - // pointer again here. (Their TApplication drew it, then our - // TApplication drew it again (undo-ing it), so now we draw it a - // third time so that it is visible.) - if ((otherMouseX != -1) && (otherMouseY != -1)) { - CellAttributes attr = getAttrXY(otherMouseX, otherMouseY); - attr.setForeColor(attr.getForeColor().invert()); - attr.setBackColor(attr.getBackColor().invert()); - putAttrXY(otherMouseX, otherMouseY, attr, false); - } - // If their cursor is visible, draw that here too. if (otherScreen.isCursorVisible()) { setCursorX(otherScreen.getCursorX() + 1);