From: Victor Toso <me@xxxxxxxxxxxxxx> gdk_seat_grab() expects that the widget is visible otherwise it will always fail with GDK_GRAB_NOT_VIEWABLE. This means that we can check if display is realized before running gdk_seat_grab(). Fixes a critical & warning introduced by 3f4c5bcc88ca5db125e > Gdk-CRITICAL **: Window 0x17dcca0 has not been made visible in > GdkSeatGrabPrepareFunc > GSpice-WARNING **: keyboard grab failed 3 Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx> --- src/spice-widget.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/spice-widget.c b/src/spice-widget.c index 9a7ea56..ff9c7d2 100644 --- a/src/spice-widget.c +++ b/src/spice-widget.c @@ -856,6 +856,8 @@ static void try_keyboard_grab(SpiceDisplay *display) return; if (d->keyboard_grab_released) return; + if (!gtk_widget_get_realized(GTK_WIDGET(display))) + return; g_return_if_fail(gtk_widget_is_focus(widget)); -- 2.9.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel