PATCH: Fix key ungrab handling wrt leave-notify
- From: "Daniel P. Berrange" <dan berrange com>
- To: gtk-vnc-list gnome org
- Subject: PATCH: Fix key ungrab handling wrt leave-notify
- Date: Mon, 1 Jun 2009 12:54:14 +0100
For inexplicable reasons, the event handlers I added for enter/leave-notify
to make it ungrab the keyboard are skipping events which don't have a mode
of GDK_CROSSING_NORMAL. This is a problem, because if the mouse is grabbed
and we're in relative-mode, then when the mouse ungrab happens, you get a
crossing mode of GDK_CROSSING_UNGRAB if the host pointer is outside the
window upon ungrab. The result is that we have the keyboard still grabbed
even though the window no longer contains the pointer. The patch simply
removes the bogus checks.
Daniel
diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index f1082da..5c78ab8 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -765,9 +765,6 @@ static gboolean enter_event(GtkWidget *widget, GdkEventCrossing *crossing)
if (priv->gvnc == NULL || !gvnc_is_initialized(priv->gvnc))
return FALSE;
- if (crossing->mode != GDK_CROSSING_NORMAL)
- return FALSE;
-
if (priv->grab_keyboard)
do_keyboard_grab(VNC_DISPLAY(widget), FALSE);
@@ -781,9 +778,6 @@ static gboolean leave_event(GtkWidget *widget, GdkEventCrossing *crossing)
if (priv->gvnc == NULL || !gvnc_is_initialized(priv->gvnc))
return FALSE;
- if (crossing->mode != GDK_CROSSING_NORMAL)
- return FALSE;
-
if (priv->grab_keyboard)
do_keyboard_ungrab(VNC_DISPLAY(widget), FALSE);
--
|: http://berrange.com/ -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://freshmeat.net/~danielpb/ -o- http://gtk-vnc.sourceforge.net :|
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]