Browse Source

macosx: replace deprecated NSRightMouse{Down,Up} with NSEventType variants

pull/201/head
Serhii Bykov 1 month ago
committed by Steve Lhomme
parent
commit
77d6c93e29
  1. 13
      modules/gui/macosx/windows/video/VLCVoutView.m

13
modules/gui/macosx/windows/video/VLCVoutView.m

@ -172,10 +172,11 @@
} else if (o_event.clickCount == 2) {
[_playerController toggleFullscreen];
}
} else if (([o_event type] == NSRightMouseDown) ||
} else if (([o_event type] == NSEventTypeRightMouseDown) ||
(([o_event type] == NSLeftMouseDown) &&
([o_event modifierFlags] & NSControlKeyMask)))
([o_event modifierFlags] & NSControlKeyMask))) {
[NSMenu popUpContextMenu: VLCMain.sharedInstance.mainMenu.voutMenu withEvent: o_event forView: self];
}
[super mouseDown: o_event];
}
@ -196,16 +197,16 @@
- (void)rightMouseDown:(NSEvent *)o_event
{
if ([o_event type] == NSRightMouseDown)
[NSMenu popUpContextMenu: VLCMain.sharedInstance.mainMenu.voutMenu withEvent: o_event forView: self];
if ([o_event type] == NSEventTypeRightMouseDown)
[NSMenu popUpContextMenu: VLCMain.sharedInstance.mainMenu.voutMenu withEvent: o_event forView: self];
[super mouseDown: o_event];
}
- (void)rightMouseUp:(NSEvent *)o_event
{
if ([o_event type] == NSRightMouseUp)
[NSMenu popUpContextMenu: VLCMain.sharedInstance.mainMenu.voutMenu withEvent: o_event forView: self];
if ([o_event type] == NSEventTypeRightMouseUp)
[NSMenu popUpContextMenu: VLCMain.sharedInstance.mainMenu.voutMenu withEvent: o_event forView: self];
[super mouseUp: o_event];
}

Loading…
Cancel
Save