Re: [gtk-vnc-devel] PATCH: Fix bogus screen updates
- From: "Jorge Pereira" <jpereiran gmail com>
- To: "Daniel P. Berrange" <berrange redhat com>
- Cc: gtk-vnc-devel <gtk-vnc-devel lists sourceforge net>
- Subject: Re: [gtk-vnc-devel] PATCH: Fix bogus screen updates
- Date: Thu, 9 Oct 2008 09:32:44 -0300
Maybe the better solution for remove many call for "gvnc_update(gvnc, x, y, width, height);"
gboolean update = TRUE;
switch (etype) {
case GVNC_ENCODING_RAW:
gvnc_raw_update(gvnc, x, y, width, height);
break;
case GVNC_ENCODING_COPY_RECT:
gvnc_copyrect_update(gvnc, x, y, width, height);
break;
case GVNC_ENCODING_RRE:
gvnc_rre_update(gvnc, x, y, width, height);
break;
case GVNC_ENCODING_HEXTILE:
gvnc_hextile_update(gvnc, x, y, width, height);
break;
case GVNC_ENCODING_ZRLE:
gvnc_zrle_update(gvnc, x, y, width, height);
break;
case GVNC_ENCODING_TIGHT:
gvnc_tight_update(gvnc, x, y, width, height);
break;
case GVNC_ENCODING_DESKTOP_RESIZE:
gvnc_resize(gvnc, width, height);
gvnc->has_error = TRUE;
update = FALSE;
break;
}
if(update)
gvnc_update(gvnc, x, y, width, height);
}
--
Regards,
+----------------------------------------------------------------------------+
Jorge Pereira, From: Olinda/Pernambuco/Brazil
Blog:
http://www.jorgepereira.com.br/
My Public Key:
http://www.jorgepereira.com.br/public.asc+---------------------------------------------------------------------------+
On Thu, Oct 9, 2008 at 7:18 AM, Daniel P. Berrange
<berrange redhat com> wrote:
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 :|
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url="">
_______________________________________________
Gtk-vnc-devel mailing list
Gtk-vnc-devel lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/gtk-vnc-devel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]