The channel state is not synchronous. It may happen that we want to set and unset quickly a modifier, but the guest modifier state hasn't been updated yet, and will still be seen as unset, preventing the last unset change. --- gtk/spice-gtk-session.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c index 644edcc..2f7869e 100644 --- a/gtk/spice-gtk-session.c +++ b/gtk/spice-gtk-session.c @@ -157,18 +157,14 @@ static guint32 get_keyboard_lock_modifiers(void) static void spice_gtk_session_sync_keyboard_modifiers_for_channel(SpiceGtkSession *self, SpiceInputsChannel* inputs) { - gint guest_modifiers = 0, client_modifiers = 0; + gint client_modifiers = 0; g_return_if_fail(SPICE_IS_INPUTS_CHANNEL(inputs)); - g_object_get(inputs, "key-modifiers", &guest_modifiers, NULL); - client_modifiers = get_keyboard_lock_modifiers(); - SPICE_DEBUG("%s: input:%p client_modifiers:0x%x, guest_modifiers:0x%x", - G_STRFUNC, inputs, client_modifiers, guest_modifiers); + SPICE_DEBUG("%s: input:%p client_modifiers:0x%x", G_STRFUNC, inputs, client_modifiers); - if (client_modifiers != guest_modifiers) - spice_inputs_set_key_locks(inputs, client_modifiers); + spice_inputs_set_key_locks(inputs, client_modifiers); } static void keymap_modifiers_changed(GdkKeymap *keymap, gpointer data) -- 1.8.5.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel