]> source.dussan.org Git - tigervnc.git/commitdiff
Graphics clip rect setting was not being honored, causing full frame repaints!
authorDRC <dcommander@users.sourceforge.net>
Sun, 12 Feb 2012 22:20:48 +0000 (22:20 +0000)
committerDRC <dcommander@users.sourceforge.net>
Sun, 12 Feb 2012 22:20:48 +0000 (22:20 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1_2@4850 3789f03b-4d11-0410-bbf8-ca57d06f2519

java/com/tigervnc/vncviewer/DesktopWindow.java
java/com/tigervnc/vncviewer/PixelBufferImage.java

index 087b58fd59f48187d1ddbd8707752879df12d31d..53d2980c457549a837b30aabcd0607d838a89e4c 100644 (file)
@@ -85,8 +85,7 @@ class DesktopWindow extends JPanel implements
   // to work.
 
   synchronized public void initGraphics() { 
-    cc.viewport.g = cc.viewport.getGraphics(); 
-    graphics = getComponentGraphics(cc.viewport.g);
+    graphics = this.getGraphics();
     prepareImage(im.image, scaledWidth, scaledHeight, this);
   }
 
index 648e63886fc4c2fdfedfebf49812d9cad8250f6a..9e34c8ab13aadf9817e49a9418c3a9e1f96c77c6 100644 (file)
@@ -103,8 +103,7 @@ public class PixelBufferImage extends PixelBuffer implements ImageProducer
   public void put(int x, int y, int w, int h, Graphics g) {
     if (ic != null) {
       ic.setPixels(x, y, w, h, cm, data, width() * y + x, width());
-      g.setClip(x, y, w, h);
-      ic.imageComplete(ImageConsumer.SINGLEFRAMEDONE);
+      desktop.repaint(x, y, w, h);
     }
   }
 
@@ -116,8 +115,7 @@ public class PixelBufferImage extends PixelBuffer implements ImageProducer
     super.copyRect(x, y, w, h, srcX, srcY);
     if (ic == null) return;
     ic.setPixels(x, y, w, h, cm, data, width() * y + x, width());
-    g.setClip(x, y, w, h);
-    ic.imageComplete(ImageConsumer.SINGLEFRAMEDONE);
+    desktop.repaint(x, y, w, h);
   }
 
   // setColourMapEntries() changes some of the entries in the colourmap.