diff options
Diffstat (limited to 'java/com/tigervnc/vncviewer')
-rw-r--r-- | java/com/tigervnc/vncviewer/DesktopWindow.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/java/com/tigervnc/vncviewer/DesktopWindow.java b/java/com/tigervnc/vncviewer/DesktopWindow.java index 38dc2457..42772629 100644 --- a/java/com/tigervnc/vncviewer/DesktopWindow.java +++ b/java/com/tigervnc/vncviewer/DesktopWindow.java @@ -414,10 +414,12 @@ class DesktopWindow extends JPanel implements /** Mouse callback function */ private void mouseCB(MouseEvent e) { - if (!cc.viewer.viewOnly.getValue() && - e.getX() >= 0 && e.getX() <= scaledWidth && - e.getY() >= 0 && e.getY() <= scaledHeight) - cc.writePointerEvent(e); + if (!cc.viewer.viewOnly.getValue()) { + if ((e.getID() == MouseEvent.MOUSE_RELEASED) || + (e.getX() >= 0 && e.getX() <= scaledWidth && + e.getY() >= 0 && e.getY() <= scaledHeight)) + cc.writePointerEvent(e); + } lastX = e.getX(); lastY = e.getY(); } |