mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-17 02:24:55 +00:00
Ensures mouse button presses propagate correctly.
Beyond the one that initiates mouse capture, that is.
This commit is contained in:
parent
b9c2c42bc0
commit
387be4a0a6
@ -276,10 +276,12 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
|||||||
#pragma mark - Mouse buttons
|
#pragma mark - Mouse buttons
|
||||||
|
|
||||||
- (void)applyButtonDown:(NSEvent *)event {
|
- (void)applyButtonDown:(NSEvent *)event {
|
||||||
if(self.shouldCaptureMouse && !_mouseIsCaptured) {
|
if(self.shouldCaptureMouse) {
|
||||||
_mouseIsCaptured = YES;
|
if(!_mouseIsCaptured) {
|
||||||
[NSCursor hide];
|
_mouseIsCaptured = YES;
|
||||||
CGAssociateMouseAndMouseCursorPosition(false);
|
[NSCursor hide];
|
||||||
|
CGAssociateMouseAndMouseCursorPosition(false);
|
||||||
|
}
|
||||||
|
|
||||||
[self.responderDelegate mouseDown:event];
|
[self.responderDelegate mouseDown:event];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user