]> source.dussan.org Git - tigervnc.git/commitdiff
[Bugfix] Selection grew incorrectly when it passed left or upper boundary of the...
authorConstantin Kaplinsky <const@tightvnc.com>
Wed, 3 Sep 2008 03:37:28 +0000 (03:37 +0000)
committerConstantin Kaplinsky <const@tightvnc.com>
Wed, 3 Sep 2008 03:37:28 +0000 (03:37 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2747 3789f03b-4d11-0410-bbf8-ca57d06f2519

java/src/com/tightvnc/vncviewer/VncCanvas.java

index 5422137b2b93078670df3ca5e07a5206ffdf7d57..17bb6c84e5bc64677b1bf8306460a27eac01ba5d 100644 (file)
@@ -2016,10 +2016,18 @@ class VncCanvas extends Canvas
       h = (h * 100 + scalingFactor/2) / scalingFactor;
     }
     // Clip the selection to framebuffer.
-    if (x < 0)
+    if (x < 0) {
+      if (horizSwap) {
+        w += x;
+      }
       x = 0;
-    if (y < 0)
+    }
+    if (y < 0) {
+      if (vertSwap) {
+        h += y;
+      }
       y = 0;
+    }
     if (x + w > rfb.framebufferWidth)
       w = rfb.framebufferWidth - x;
     if (y + h > rfb.framebufferHeight)