aboutsummaryrefslogtreecommitdiff
path: root/trace/control-internal.h
diff options
context:
space:
mode:
authorChen Zhang <tgfbeta@me.com>2019-06-04 17:36:00 +0800
committerPeter Maydell <peter.maydell@linaro.org>2019-06-13 11:23:22 +0100
commit2044dff87004b9b0faf1c8299491b258332c6887 (patch)
tree454a57b2727288bec36b7be61e9a067195d3986d /trace/control-internal.h
parentfe18911af739d292ad2e62c6699a705a08302fca (diff)
ui/cocoa: Fix absolute input device grabbing issue on Mojave
On Mojave, absolute input device, i.e. tablet, had trouble re-grabbing the cursor in re-entry into the virtual screen area. In some cases, the `window` property of NSEvent object was nil after cursor exiting from window, hinting that the `-locationInWindow` method would return value in screen coordinates. The current implementation used raw locations from NSEvent without considering whether the value was for the window coordinates or the macOS screen coordinates, nor the zooming factor for Zoom-to-Fit in fullscreen mode. In fullscreen mode, the fullscreen cocoa window might not be the key window, therefore the location of event in virtual coordinates should suffice. This patches fixed boundary check methods for cursor in normal and fullscreen with/without Zoom-to-Fit in Mojave. Note: CGRect, -convertRectToScreen: and -convertRectFromScreen: were used in coordinates conversion for compatibility reason. Signed-off-by: Chen Zhang <tgfbeta@me.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: FA3FBC4F-5379-4118-B997-58FE05CC58F9@me.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'trace/control-internal.h')
0 files changed, 0 insertions, 0 deletions