[gtk-vnc-devel] [patch] - grab cursor



Hi, folks.

When i call vnc_display_set_pointer_grab(), it's not grabbing the
cursor, only ungrabbing.

I've made some tests with vinagre and it's working as *i* expected.

Am i thinking in the right way? Is this patch right?

Thanks,
-- 
Jonh Wendell
www.bani.com.br

diff -r 8d1799e6a392 src/vncdisplay.c
--- a/src/vncdisplay.c	Wed Oct 10 16:38:16 2007 -0400
+++ b/src/vncdisplay.c	Wed Oct 17 16:47:48 2007 -0300
@@ -1174,6 +1174,8 @@ void vnc_display_set_pointer_grab(VncDis
 	priv->grab_pointer = enable;
 	if (!enable && priv->absolute && priv->in_pointer_grab)
 		do_pointer_ungrab(obj, FALSE);
+	if (enable && priv->absolute && !priv->in_pointer_grab)
+		do_pointer_grab(obj, FALSE);
 }
 
 void vnc_display_set_keyboard_grab(VncDisplay *obj, gboolean enable)
@@ -1183,6 +1185,9 @@ void vnc_display_set_keyboard_grab(VncDi
 	priv->grab_keyboard = enable;
 	if (!enable && priv->in_keyboard_grab && !priv->in_pointer_grab)
 		do_keyboard_ungrab(obj, FALSE);
+	if (enable && !priv->in_keyboard_grab)
+		do_keyboard_grab(obj, FALSE);
+
 }
 
 GType vnc_display_credential_get_type(void)


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