mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +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
|
||||
|
||||
- (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];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user