From 40adca4aefd5fec91580ced6d078c6021ed084d6 Mon Sep 17 00:00:00 2001 From: DRC Date: Sun, 12 Feb 2012 22:20:48 +0000 Subject: [PATCH] Graphics clip rect setting was not being honored, causing full frame repaints! 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 | 3 +-- java/com/tigervnc/vncviewer/PixelBufferImage.java | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/java/com/tigervnc/vncviewer/DesktopWindow.java b/java/com/tigervnc/vncviewer/DesktopWindow.java index 087b58fd..53d2980c 100644 --- a/java/com/tigervnc/vncviewer/DesktopWindow.java +++ b/java/com/tigervnc/vncviewer/DesktopWindow.java @@ -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); } diff --git a/java/com/tigervnc/vncviewer/PixelBufferImage.java b/java/com/tigervnc/vncviewer/PixelBufferImage.java index 648e6388..9e34c8ab 100644 --- a/java/com/tigervnc/vncviewer/PixelBufferImage.java +++ b/java/com/tigervnc/vncviewer/PixelBufferImage.java @@ -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. -- 2.39.5