[gtk-vnc-devel] PATCH: Fix bogus screen updates
- From: "Daniel P. Berrange" <berrange redhat com>
- To: gtk-vnc-devel <gtk-vnc-devel lists sourceforge net>
- Subject: [gtk-vnc-devel] PATCH: Fix bogus screen updates
- Date: Thu, 9 Oct 2008 11:18:00 +0100
I just started randomly getting a X error when running against certain
VNC servers. Eventually discovered that it was caused by a server
switching from relative to absolute mouse mode. This uses a psuedo
encoding, unfortuntely our code was triggering a screen redraw on every
frame buffer update message, not just the ones with framebuffer data.
The absolute pointer message comes with x=1, y=0, w=800, h=600, which
caused us to try and copy an 800 pixel client image to another 800 pixel
image on the server, at an offset of 1,thus 1 pixel out of bounds.
This patch avoids triggering updates for anything other than real fb
updates
Daniel
diff --git a/src/gvnc.c b/src/gvnc.c
--- a/src/gvnc.c
+++ b/src/gvnc.c
@@ -1946,21 +1946,27 @@ static void gvnc_framebuffer_update(stru
switch (etype) {
case GVNC_ENCODING_RAW:
gvnc_raw_update(gvnc, x, y, width, height);
+ gvnc_update(gvnc, x, y, width, height);
break;
case GVNC_ENCODING_COPY_RECT:
gvnc_copyrect_update(gvnc, x, y, width, height);
+ gvnc_update(gvnc, x, y, width, height);
break;
case GVNC_ENCODING_RRE:
gvnc_rre_update(gvnc, x, y, width, height);
+ gvnc_update(gvnc, x, y, width, height);
break;
case GVNC_ENCODING_HEXTILE:
gvnc_hextile_update(gvnc, x, y, width, height);
+ gvnc_update(gvnc, x, y, width, height);
break;
case GVNC_ENCODING_ZRLE:
gvnc_zrle_update(gvnc, x, y, width, height);
+ gvnc_update(gvnc, x, y, width, height);
break;
case GVNC_ENCODING_TIGHT:
gvnc_tight_update(gvnc, x, y, width, height);
+ gvnc_update(gvnc, x, y, width, height);
break;
case GVNC_ENCODING_DESKTOP_RESIZE:
gvnc_resize(gvnc, width, height);
@@ -1986,8 +1992,6 @@ static void gvnc_framebuffer_update(stru
gvnc->has_error = TRUE;
break;
}
-
- gvnc_update(gvnc, x, y, width, height);
}
gboolean gvnc_server_message(struct gvnc *gvnc)
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]