Commit 2cf75012 authored by Felix Paul Kühne's avatar Felix Paul Kühne

windowed mac plugin: allow leaving fullscreen through a double click on the...

windowed mac plugin: allow leaving fullscreen through a double click on the vout and respond to the space key the way we expect
parent b06ffc01
......@@ -388,6 +388,9 @@ bool VlcPluginMac::handle_event(void *event)
if (cocoaEvent->data.key.keyCode == 53) {
toggle_fullscreen();
return true;
} else if (cocoaEvent->data.key.keyCode == 49) {
playlist_togglePause();
return true;
}
}
case NPCocoaEventKeyUp:
......@@ -936,11 +939,24 @@ static CGImageRef createImageNamed(NSString *name)
if (key == (unichar) 0x1b) {
self.cppPlugin->toggle_fullscreen();
return;
} else if (key == ' ') {
self.cppPlugin->playlist_togglePause();
return;
}
}
}
[super keyDown: theEvent];
}
- (void)mouseDown:(NSEvent *)theEvent
{
if ([theEvent type] == NSLeftMouseDown && !([theEvent modifierFlags] & NSControlKeyMask)) {
if ([theEvent clickCount] > 1)
self.cppPlugin->toggle_fullscreen();
}
[super mouseDown: 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