From f963a44d276c647b199cc7cebeeceda221bcbe62 Mon Sep 17 00:00:00 2001 From: Brian Hinz Date: Mon, 18 Feb 2013 22:46:04 +0000 Subject: Notify the server of mouse release events even if they're outside the desktop area. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5043 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- java/com/tigervnc/vncviewer/DesktopWindow.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'java') 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(); } -- cgit v1.2.3