Re: [PATCH v3 1/2] ui/cocoa: capture all keys and combos when mouse is grabbed

2021-05-11 Thread Gustavo Noronha Silva
Hey, On Tue, May 11, 2021, at 12:08 AM, Akihiko Odaki wrote: > > +CFRunLoopAddSource(runLoop, tapEventsSrc, kCFRunLoopDefaultMode); > > +CFRelease(tapEventsSrc); > > + > > return self; > > } > > > > These statements should be in "if (self)" block which they follow, or it > ma

Re: [PATCH v3 1/2] ui/cocoa: capture all keys and combos when mouse is grabbed

2021-05-10 Thread Akihiko Odaki
On 2021/05/05 8:32, gust...@noronha.eti.br wrote:> @@ -344,6 +361,32 @@ - (id)initWithFrame:(NSRect)frameRect kbd = qkbd_state_init(dcl.con); } + +CGEventMask mask = CGEventMaskBit(kCGEventKeyDown) | CGEventMaskBit(kCGEventKeyUp) | CGEventMaskBit(kCGEventFlagsChanged); +

Re: [PATCH v3 1/2] ui/cocoa: capture all keys and combos when mouse is grabbed

2021-05-10 Thread 'Gerd Hoffmann '
On Tue, May 04, 2021 at 08:32:31PM -0300, gust...@noronha.eti.br wrote: > From: Gustavo Noronha Silva > > Applications such as Gnome may use Alt-Tab and Super-Tab for different > purposes, some use Ctrl-arrows so we want to allow qemu to handle > everything when it captures the mouse/keyboard. >

[PATCH v3 1/2] ui/cocoa: capture all keys and combos when mouse is grabbed

2021-05-04 Thread gustavo
From: Gustavo Noronha Silva Applications such as Gnome may use Alt-Tab and Super-Tab for different purposes, some use Ctrl-arrows so we want to allow qemu to handle everything when it captures the mouse/keyboard. However, Mac OS handles some combos like Command-Tab and Ctrl-arrows at an earlier