1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-09 21:29:53 +00:00

Ensures mouse button presses propagate correctly.

Beyond the one that initiates mouse capture, that is.
This commit is contained in:
Thomas Harte 2019-07-02 16:57:51 -04:00
parent b9c2c42bc0
commit 387be4a0a6

View File

@ -276,10 +276,12 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
#pragma mark - Mouse buttons
- (void)applyButtonDown:(NSEvent *)event {
if(self.shouldCaptureMouse && !_mouseIsCaptured) {
_mouseIsCaptured = YES;
[NSCursor hide];
CGAssociateMouseAndMouseCursorPosition(false);
if(self.shouldCaptureMouse) {
if(!_mouseIsCaptured) {
_mouseIsCaptured = YES;
[NSCursor hide];
CGAssociateMouseAndMouseCursorPosition(false);
}
[self.responderDelegate mouseDown:event];
}