Commit e1176ec7 authored by Felix Paul Kühne's avatar Felix Paul Kühne

windowed mac plugin: make sure that the toolbar responds to mouse events in fullscreen mode

parent 2cf75012
......@@ -951,12 +951,42 @@ static CGImageRef createImageNamed(NSString *name)
- (void)mouseDown:(NSEvent *)theEvent
{
if ([theEvent type] == NSLeftMouseDown && !([theEvent modifierFlags] & NSControlKeyMask)) {
if ([theEvent clickCount] > 1)
if ([theEvent clickCount] >= 2)
self.cppPlugin->toggle_fullscreen();
else {
NSPoint point = [NSEvent mouseLocation];
[controllerLayer handleMouseDown:[browserRootLayer convertPoint:point toLayer:controllerLayer]];
}
}
[super mouseDown: theEvent];
}
- (void)mouseUp:(NSEvent *)theEvent
{
NSPoint point = [NSEvent mouseLocation];
[controllerLayer handleMouseUp:[browserRootLayer convertPoint:point toLayer:controllerLayer]];
[super mouseUp: theEvent];
}
- (void)mouseDragged:(NSEvent *)theEvent
{
NSPoint point = [NSEvent mouseLocation];
[controllerLayer handleMouseDragged:[browserRootLayer convertPoint:point toLayer:controllerLayer]];
[super mouseDragged: theEvent];
}
- (void)mouseMoved:(NSEvent *)theEvent
{
self.cppPlugin->set_toolbar_visible(true);
[super mouseMoved: theEvent];
}
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment