ui/cocoa: Don't call NSApp sendEvent directly from handleEvent
commit60105d7a1cbe5f347f66a422700ae073edad34f8
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 25 Feb 2019 10:24:31 +0000 (25 10:24 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 4 Mar 2019 16:47:31 +0000 (4 16:47 +0000)
tree431592f2d2180cecefa4f6f587b3d559ed716dd0
parent8b00e4e7307c1daf611486de29c4b0011831d814
ui/cocoa: Don't call NSApp sendEvent directly from handleEvent

Currently the handleEvent method will directly call the NSApp
sendEvent method for any events that we want to let OSX deal
with. When we rearrange the event handling code, the way that
we say "let OSX have this event" is going to change. Prepare
for that by refactoring so that handleEvent returns a flag
indicating whether it consumed the event.

Suggested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Tested-by: Roman Bolshakov <r.bolshakov@yadro.com>
Message-id: 20190225102433.22401-6-peter.maydell@linaro.org
Message-id: 20190214102816.3393-6-peter.maydell@linaro.org
ui/cocoa.m