For some reason, after unlocking a locked screen, spice receives an enter event before focus-in event (this possible a Gtk issue). This wrong sequence of events is causing a wrong mouse focus. This operation gives to enter event the ability to grab keyboard and when focus-in event is raised, keyboard is already grabbed by enter event. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1485968 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1571422 Signed-off-by: Julio Faracco <jcfaracco@xxxxxxxxx> --- src/spice-widget.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/spice-widget.c b/src/spice-widget.c index 767550b..650c314 100644 --- a/src/spice-widget.c +++ b/src/spice-widget.c @@ -1805,8 +1805,12 @@ static gboolean enter_event(GtkWidget *widget, GdkEventCrossing *crossing G_GNUC DISPLAY_DEBUG(display, "%s", __FUNCTION__); - d->mouse_have_pointer = true; - spice_gtk_session_set_mouse_has_pointer(d->gtk_session, true); + if (spice_gtk_session_get_keyboard_has_focus(d->gtk_session) && + spice_gtk_session_get_mouse_has_pointer(d->gtk_session)) { + d->mouse_have_pointer = true; + spice_gtk_session_set_mouse_has_pointer(d->gtk_session, true); + } + try_keyboard_grab(display); update_display(display); -- 2.17.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel