summaryrefslogtreecommitdiffstats
path: root/java/com/tigervnc/vncviewer
diff options
context:
space:
mode:
authorBrian Hinz <bphinz@users.sourceforge.net>2013-02-18 22:46:04 +0000
committerBrian Hinz <bphinz@users.sourceforge.net>2013-02-18 22:46:04 +0000
commitf963a44d276c647b199cc7cebeeceda221bcbe62 (patch)
treeb8aba4f07928d4a303e6e215b22333ce09fff94e /java/com/tigervnc/vncviewer
parent64deccff7223f93b3418b74750729d52fcd6ef75 (diff)
downloadtigervnc-f963a44d276c647b199cc7cebeeceda221bcbe62.tar.gz
tigervnc-f963a44d276c647b199cc7cebeeceda221bcbe62.zip
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
Diffstat (limited to 'java/com/tigervnc/vncviewer')
-rw-r--r--java/com/tigervnc/vncviewer/DesktopWindow.java10
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();
}