> On Feb 19, 2018, at 3:54 AM, Gerd Hoffmann <kra...@redhat.com> wrote: > > Hi, > >> +/* Sends any keys that were delayed because they were part of the ungrab >> set */ >> +static void send_key_if_delayed(Set *the_set, int keycode) >> +{ >> + if (contains_number(the_set, keycode)) { >> + qemu_input_event_send_key_qcode(dcl->con, keycode, true); >> + qemu_input_event_send_key_qcode(dcl->con, keycode, false); >> + } >> +} > >> case NSEventTypeKeyUp: >> keycode = cocoa_keycode_to_qemu([event keyCode]); >> >> + if (are_sets_equal(ungrab_set, key_set)) { >> + [self ungrabMouse]; >> + clear_set(key_set); >> + return; >> + } >> + send_key_if_delayed(key_set, keycode); >> + remove_number(key_set, keycode); > > This doesn't maintain the event ordering.
I need more clearifiction. If the ungrab keys are 1-2-3, and the user does this: down: 2 down: 3 down: 4 The only input that is sent to the guest is the 4. The 2 and 3 are forgotten about. You want the 2 and the 3 sent to the guest in the order they were pushed? Is there another condition that needs work.