Re: [gtk-vnc-devel] PATCH: 2/2: Render using cairo, allowing scaling



On Dom, 2008-09-07 at 17:25 +0100, Daniel P. Berrange wrote:

>  configure.ac     |   17 ++++++
>  src/vncdisplay.c |  141 ++++++++++++++++++++++++++++++++++++++++++++++---------
>  2 files changed, 136 insertions(+), 22 deletions(-)

Hi, attached is a patch to fix the mouse motion getting wrong.

OK?
-- 
Jonh Wendell
http://www.bani.com.br
diff -r cf0e849385e0 src/vncdisplay.c
--- a/src/vncdisplay.c	Thu Sep 11 17:07:42 2008 +0100
+++ b/src/vncdisplay.c	Fri Sep 12 16:09:58 2008 -0300
@@ -548,8 +548,8 @@
 
 	if (priv->allow_scaling) {
 		double sx, sy;
-		sx = (double)ww / (double)priv->fb.width;
-		sy = (double)wh / (double)priv->fb.height;
+		sx = (double)priv->fb.width / (double)ww;
+		sy = (double)priv->fb.height / (double)wh;
 
 		motion->x *= sx;
 		motion->y *= sy;


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