Re: [gtk-vnc-devel] [PATCH 2/7] Add support for LastRect encoding 2008-11-20 Federico Mena Quintero <federico novell com>
- From: Anthony Liguori <anthony codemonkey ws>
- To: Federico Mena Quintero <federico novell com>
- Cc: gtk-vnc-devel lists sourceforge net
- Subject: Re: [gtk-vnc-devel] [PATCH 2/7] Add support for LastRect encoding 2008-11-20 Federico Mena Quintero <federico novell com>
- Date: Wed, 17 Dec 2008 19:49:46 -0600
This is a non-standard encoding and I don't see why it would be
helpful. How does it change things from a server's perspective?
Regards,
Anthony Liguori
Federico Mena Quintero wrote:
Add support for LastRect encoding to make life easier (?) on the
VNC server.
* src/gvnc.h (gvnc_encoding): Define GVNC_ENCODING_LAST_RECT.
* src/vncdisplay.c (vnc_coroutine): Advertise
GVNC_ENCODING_LAST_RECT as a supported encoding.
* src/gvnc.c (gvnc_server_message): Stop processing rectangles
in FramebufferUpdate when we get a LastRect rectangle.
Signed-off-by: Federico Mena Quintero <federico novell com>
---
ChangeLog | 13 +++++++++++++
src/gvnc.c | 7 ++++++-
src/gvnc.h | 1 +
src/vncdisplay.c | 2 +-
4 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 64355ca..6ce4994 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2008-11-20 Federico Mena Quintero <federico novell com>
+
+ Add support for LastRect encoding to make life easier (?) on the
+ VNC server.
+
+ * src/gvnc.h (gvnc_encoding): Define GVNC_ENCODING_LAST_RECT.
+
+ * src/vncdisplay.c (vnc_coroutine): Advertise
+ GVNC_ENCODING_LAST_RECT as a supported encoding.
+
+ * src/gvnc.c (gvnc_server_message): Stop processing rectangles
+ in FramebufferUpdate when we get a LastRect rectangle.
+
2008-11-18 Federico Mena Quintero <federico novell com>
* src/vncdisplay.c (vnc_coroutine): Specify the encodings in the
diff --git a/src/gvnc.c b/src/gvnc.c
index 9cf1204..ba689fa 100644
--- a/src/gvnc.c
+++ b/src/gvnc.c
@@ -2022,7 +2022,7 @@ gboolean gvnc_server_message(struct gvnc *gvnc)
switch (msg) {
case 0: { /* FramebufferUpdate */
uint8_t pad[1];
- uint16_t n_rects;
+ int n_rects;
int i;
gvnc_read(gvnc, pad, 1);
@@ -2037,6 +2037,11 @@ gboolean gvnc_server_message(struct gvnc *gvnc)
h = gvnc_read_u16(gvnc);
etype = gvnc_read_s32(gvnc);
+ if (etype == GVNC_ENCODING_LAST_RECT) {
+ GVNC_DEBUG ("FramebufferUpdate(LastRect)\n");
+ break;
+ }
+
gvnc_framebuffer_update(gvnc, etype, x, y, w, h);
}
} break;
diff --git a/src/gvnc.h b/src/gvnc.h
index 0bd42e2..f1314eb 100644
--- a/src/gvnc.h
+++ b/src/gvnc.h
@@ -89,6 +89,7 @@ typedef enum {
/* Pseudo encodings */
GVNC_ENCODING_DESKTOP_RESIZE = -223,
+ GVNC_ENCODING_LAST_RECT = -224,
GVNC_ENCODING_WMVi = 0x574D5669,
GVNC_ENCODING_CURSOR_POS = -232,
diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index fa081a2..45ef57a 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -1278,7 +1278,7 @@ static void *vnc_coroutine(void *opaque)
GVNC_ENCODING_XCURSOR,
GVNC_ENCODING_RICH_CURSOR,
/* GVNC_ENCODING_CURSOR_POS, */ /* we don't implement this */
- /* GVNC_ENCODING_LAST_RECT, */ /* we don't implement this */
+ GVNC_ENCODING_LAST_RECT,
GVNC_ENCODING_DESKTOP_RESIZE,
/* TightVNC's encodings end above; the following are our own proposed encodings */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]