The purpose of the keyboard-grab-inihbit mechanism is to allow other apps to grab the input while the spice-widget has the focus, mainly when we're going to invoke policykit for usb-redirection, as that the policy-kit agent may want to grab the input. Before this patch we were only inhibitting the keyboard grab, which works fine for vms which are in client mouse mode, but is not enough for vms which are in server mouse mode. This patch also releases the mouse grab on keyboard-grab-inhibit, fixing the policykit dialog not showing (and thus usb redir not working) when running with server mouse mode. Note that this makes the inhibit-keyboard-grab name of the property no longer really cover what it does, but allas it is part of our ABI... Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> --- gtk/spice-widget.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c index 02bb089..2bb7b38 100644 --- a/gtk/spice-widget.c +++ b/gtk/spice-widget.c @@ -372,6 +372,7 @@ static void session_inhibit_keyboard_grab_changed(GObject *gobject, g_object_get(d->session, "inhibit-keyboard-grab", &d->keyboard_grab_inhibit, NULL); update_keyboard_grab(display); + update_mouse_grab(display); } static void spice_display_dispose(GObject *obj) @@ -844,7 +845,9 @@ static void update_mouse_grab(SpiceDisplay *display) { SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); - if (d->mouse_grab_enable && !d->disable_inputs) + if (d->mouse_grab_enable && + !d->keyboard_grab_inhibit && + !d->disable_inputs) try_mouse_grab(display); else try_mouse_ungrab(display); -- 1.7.10.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel