]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/VideoView.m
macosx: add yosemite guard
[vlc] / modules / gui / macosx / VideoView.m
index 9d32c3907eb5326dbd1d5d8adeab8eef63849aa8..c02e4495c135762dd63ee4e548a3fbb4ebd20773 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * VideoView.m: MacOS X video output module
  *****************************************************************************
- * Copyright (C) 2002-2013 VLC authors and VideoLAN
+ * Copyright (C) 2002-2014 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Derk-Jan Hartman <hartman at videolan dot org>
  * Preamble
  *****************************************************************************/
 #import <stdlib.h>                                                 /* free() */
-#import <string.h>
 
+#import "CompatibilityFixes.h"
 #import "intf.h"
 #import "VideoView.h"
 #import "CoreInteraction.h"
 #import "MainMenu.h"
-#import "MainWindow.h"
 
-#import <vlc_common.h>
 #import <vlc_keys.h>
 
 
@@ -62,7 +60,7 @@
 -(id)initWithFrame:(NSRect)frameRect
 {
     if (self = [super initWithFrame:frameRect]) {
-        [self registerForDraggedTypes:[NSArray arrayWithObject: NSFilenamesPboardType]];
+        [self registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
     }
 
     i_lastScrollWheelDirection = 0;
             else if (key == 'f' && i_pressed_modifiers & NSControlKeyMask && i_pressed_modifiers & NSCommandKeyMask)
                 [[VLCCoreInteraction sharedInstance] toggleFullscreen];
             else if (p_vout) {
-                if (key == ' ')
-                    [[VLCCoreInteraction sharedInstance] playOrPause];
-                else {
-                    val.i_int |= (int)CocoaKeyToVLC(key);
-                    var_Set(p_vout->p_libvlc, "key-pressed", val);
-                }
+                val.i_int |= (int)CocoaKeyToVLC(key);
+                var_Set(p_vout->p_libvlc, "key-pressed", val);
             }
             else
                 msg_Dbg(VLCIntf, "could not send keyevent to VLC core");
 - (void)mouseDown:(NSEvent *)o_event
 {
     if (([o_event type] == NSLeftMouseDown) && (! ([o_event modifierFlags] &  NSControlKeyMask))) {
-        if ([o_event clickCount] > 1)
+        if ([o_event clickCount] == 2)
             [[VLCCoreInteraction sharedInstance] toggleFullscreen];
+
     } else if (([o_event type] == NSRightMouseDown) ||
                (([o_event type] == NSLeftMouseDown) &&
                ([o_event modifierFlags] &  NSControlKeyMask)))