[gtk-vnc-devel] [patch] focus on click



Hi, folks. In vinagre on Ubuntu Gutsy, I needed to patch gtk-vnc in
order to get the focus in the widget in the mouse click.

That's weird, we have to call explicitly grab_focus() to get the focus
in a mouse click... but it works for me now.

What do you think? May I commit?

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



diff -r 1e6a5272ef00 src/vncdisplay.c
--- a/src/vncdisplay.c	Wed Feb 06 22:20:39 2008 -0600
+++ b/src/vncdisplay.c	Fri Feb 08 16:50:45 2008 -0300
@@ -380,6 +380,8 @@ static gboolean button_event(GtkWidget *
 
 	if (priv->read_only)
 		return FALSE;
+
+	gtk_widget_grab_focus (widget);
 
 	if (priv->grab_pointer && !priv->absolute && !priv->in_pointer_grab &&
 	    button->button == 1 && button->type == GDK_BUTTON_PRESS)


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