[Spice-devel] [PATCH spice-gtk 1/4] Grab focus before grabing keyboard
Hans de Goede
hdegoede at redhat.com
Sun Jan 15 09:06:54 PST 2012
Hi,
Series looks good, and good work on chasing down that hang!
Ack-series.
Regards,
Hans
On 01/15/2012 05:23 PM, Marc-André Lureau wrote:
> Make sure the display has the focus before grabing the keyboard for
> the application.
> ---
> gtk/spice-widget.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
> index 1dd06f1..362f313 100644
> --- a/gtk/spice-widget.c
> +++ b/gtk/spice-widget.c
> @@ -483,9 +483,9 @@ static void try_keyboard_grab(SpiceDisplay *display)
> return;
>
> g_return_if_fail(gtk_widget_is_focus(widget));
> - g_return_if_fail(gtk_widget_has_focus(widget));
>
> SPICE_DEBUG("grab keyboard");
> + gtk_widget_grab_focus(widget);
>
> #ifdef WIN32
> d->keyboard_hook = SetWindowsHookEx(WH_KEYBOARD_LL, keyboard_hook_cb,
More information about the Spice-devel
mailing list