Re: [Qemu-devel] [PATCH v7] ui/cocoa.m: Add ability for user to specify mouse ungrab key

2018-02-20 Thread Gerd Hoffmann
> >> case NSEventTypeKeyUp: > >> keycode = cocoa_keycode_to_qemu([event keyCode]); > >> > >> +if (are_sets_equal(ungrab_set, key_set)) { > >> +[self ungrabMouse]; > >> +clear_set(key_set); > >> +return; > >> +

Re: [Qemu-devel] [PATCH v7] ui/cocoa.m: Add ability for user to specify mouse ungrab key

2018-02-19 Thread Programmingkid
> On Feb 19, 2018, at 3:54 AM, Gerd Hoffmann 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)) { >> +

Re: [Qemu-devel] [PATCH v7] ui/cocoa.m: Add ability for user to specify mouse ungrab key

2018-02-19 Thread Gerd Hoffmann
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); > +