[gtk-vnc-devel] [patch] - save dimension changes



Hi, folks.

There's a little bug in gtk-vnc in the resize code. We aren't keeping
the new sizes when we receive a desktop-resize message. So, this patch
just saves the new values so that they are available later through
vnc_display_get_[width, height].

Cheers,
-- 
Jonh Wendell
http://www.bani.com.br
diff -r a3c68b4f30bd src/gvnc.c
--- a/src/gvnc.c	Mon Sep 15 09:16:55 2008 -0300
+++ b/src/gvnc.c	Fri Oct 17 17:22:59 2008 -0300
@@ -1818,8 +1818,15 @@
 
 static void gvnc_resize(struct gvnc *gvnc, int width, int height)
 {
-	if (gvnc->has_error || !gvnc->ops.resize)
+	if (gvnc->has_error)
 		return;
+
+	gvnc->width = width;
+	gvnc->height = height;
+
+	if (!gvnc->ops.resize)
+		return;
+
 	if (!gvnc->ops.resize(gvnc->ops_data, width, height)) {
 		GVNC_DEBUG("Closing the connection: gvnc_resize\n");
 		gvnc->has_error = TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]