[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7] ui/cocoa.m: Add ability for user to specify
From: |
Programmingkid |
Subject: |
Re: [Qemu-devel] [PATCH v7] ui/cocoa.m: Add ability for user to specify mouse ungrab key |
Date: |
Mon, 19 Feb 2018 10:50:30 -0500 |
> On Feb 19, 2018, at 3:54 AM, Gerd Hoffmann <address@hidden> 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.