Graphics clip rect setting was not being honored, causing full frame repaints!

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4843 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/java/com/tigervnc/vncviewer/DesktopWindow.java b/java/com/tigervnc/vncviewer/DesktopWindow.java
index 087b58f..53d2980 100644
--- a/java/com/tigervnc/vncviewer/DesktopWindow.java
+++ b/java/com/tigervnc/vncviewer/DesktopWindow.java
@@ -85,8 +85,7 @@
   // 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);
   }
 
diff --git a/java/com/tigervnc/vncviewer/PixelBufferImage.java b/java/com/tigervnc/vncviewer/PixelBufferImage.java
index 648e638..9e34c8a 100644
--- a/java/com/tigervnc/vncviewer/PixelBufferImage.java
+++ b/java/com/tigervnc/vncviewer/PixelBufferImage.java
@@ -103,8 +103,7 @@
   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 @@
     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.