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 is nil, after exit of cursor, meaning 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.

The following patches fixed boundary check methods for cursor in normal and 
fullscreen with/without Zoom-to-Fit in Mojave.

Chen Zhang (2):
  Fix absolute input device grabbing issues on Mojave
  ui/cocoa: fix grabbing issue in fullscreen mode

 ui/cocoa.m | 54 +++++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 47 insertions(+), 7 deletions(-)

-- 
2.19.2


Reply via email to