[Spice-devel] [PATCH spice-gtk] Do not send ungrab key sequence
Hans de Goede
hdegoede at redhat.com
Fri Dec 9 07:46:44 PST 2011
Hi,
On 12/09/2011 04:31 PM, Marc-André Lureau wrote:
> ---
> gtk/spice-widget.c | 20 +++++++++-----------
> 1 files changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
> index 9e45979..d3647a4 100644
> --- a/gtk/spice-widget.c
> +++ b/gtk/spice-widget.c
> @@ -876,6 +876,15 @@ static gboolean key_event(GtkWidget *widget, GdkEventKey *key)
> __FUNCTION__, key->type == GDK_KEY_PRESS ? "press" : "release",
> key->hardware_keycode, key->state, key->group);
>
> + if (check_for_grab_key(display, key->type, key->keyval)) {
> + g_signal_emit(widget, signals[SPICE_DISPLAY_GRAB_KEY_PRESSED], 0);
> + if (d->mouse_grab_active)
> + try_mouse_ungrab(display);
> + else
> + try_mouse_grab(display);
> + return true;
> + }
> +
> if (!d->inputs)
> return true;
>
As you suggested yourself, we should only do this in server mouse mode, so I assume you're
going to send a new revision for this?
Regards,
Hans
More information about the Spice-devel
mailing list