Yep, sounds good too Christophe
On Fri, Aug 12, 2011 at 04:50:36PM +0200, Hans de Goede wrote: > With the filtering of focus in / out events caused by grabs we should no > longer need this. > > Signed-off-by: Hans de Goede <hdego...@redhat.com> > --- > gtk/spice-widget-priv.h | 2 -- > gtk/spice-widget.c | 17 ----------------- > 2 files changed, 0 insertions(+), 19 deletions(-) > > diff --git a/gtk/spice-widget-priv.h b/gtk/spice-widget-priv.h > index 5527ebc..bd6dedb 100644 > --- a/gtk/spice-widget-priv.h > +++ b/gtk/spice-widget-priv.h > @@ -105,8 +105,6 @@ struct _SpiceDisplayPrivate { > > bool keyboard_grab_active; > bool keyboard_have_focus; > - int keyboard_grab_count; > - time_t keyboard_grab_time; > > const guint16 const *keycode_map; > size_t keycode_maplen; > diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c > index 30036ce..7afc6eb 100644 > --- a/gtk/spice-widget.c > +++ b/gtk/spice-widget.c > @@ -377,7 +377,6 @@ static void try_keyboard_grab(SpiceDisplay *display) > { > GtkWidget *widget = GTK_WIDGET(display); > SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); > - time_t now; > GdkGrabStatus status; > > if (d->keyboard_grab_active) > @@ -393,22 +392,6 @@ static void try_keyboard_grab(SpiceDisplay *display) > g_return_if_fail(gtk_widget_is_focus(widget)); > g_return_if_fail(gtk_widget_has_focus(widget)); > > - /* > - * focus / keyboard grab behavior is funky sometime > - * when going fullscreen (with KDE and GNOME-shell): > - * focus-in-event -> grab -> focus-out-event -> ungrab -> repeat > - * I have no idea why the grab triggers focus-out :-( > - */ > - now = time(NULL); > - if (d->keyboard_grab_time != now) { > - d->keyboard_grab_time = now; > - d->keyboard_grab_count = 0; > - } > - if (d->keyboard_grab_count++ > 32) { > - g_critical("32 grabs last second -> emergency exit"); > - return; > - } > - > SPICE_DEBUG("grab keyboard"); > > #ifdef WIN32 > -- > 1.7.5.1 > > _______________________________________________ > Spice-devel mailing list > Spice-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/spice-devel
pgpzNx5hhIQmo.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel