1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-23 06:28:59 +00:00

Improves mouse capture behaviour.

This commit is contained in:
Thomas Harte 2019-07-11 22:56:08 -04:00
parent c8917e677b
commit 9f0cde3d69

View File

@ -281,6 +281,10 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
_mouseIsCaptured = YES; _mouseIsCaptured = YES;
[NSCursor hide]; [NSCursor hide];
CGAssociateMouseAndMouseCursorPosition(false); CGAssociateMouseAndMouseCursorPosition(false);
// Don't report the first click to the delegate; treat that as merely
// an invitation to capture the cursor.
return;
} }
[self.responderDelegate mouseDown:event]; [self.responderDelegate mouseDown:event];