[vlc-commits] macosx: remove unneeded p_vouts in videoview
David Fuhrmann
git at videolan.org
Fri May 11 17:32:37 CEST 2012
vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun May 6 10:50:34 2012 +0200| [a2ef7dad88de2d2a28fc8080438c49f34d06ceaa] | committer: David Fuhrmann
macosx: remove unneeded p_vouts in videoview
(cherry picked from commit a2347e5728d0c6749172f43ce40387338224103e)
Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=a2ef7dad88de2d2a28fc8080438c49f34d06ceaa
---
modules/gui/macosx/VideoView.m | 44 +++++++++++----------------------------
1 files changed, 13 insertions(+), 31 deletions(-)
diff --git a/modules/gui/macosx/VideoView.m b/modules/gui/macosx/VideoView.m
index 469b198..ed0f005 100644
--- a/modules/gui/macosx/VideoView.m
+++ b/modules/gui/macosx/VideoView.m
@@ -189,26 +189,20 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (void)mouseDown:(NSEvent *)o_event
{
- vout_thread_t * p_vout = getVout();
- if( p_vout )
+ if( ( [o_event type] == NSLeftMouseDown ) &&
+ ( ! ( [o_event modifierFlags] & NSControlKeyMask ) ) )
{
- if( ( [o_event type] == NSLeftMouseDown ) &&
- ( ! ( [o_event modifierFlags] & NSControlKeyMask ) ) )
- {
- if( [o_event clickCount] > 1 )
- {
- /* multiple clicking */
- [[VLCCoreInteraction sharedInstance] toggleFullscreen];
- }
- }
- else if( ( [o_event type] == NSRightMouseDown ) ||
- ( ( [o_event type] == NSLeftMouseDown ) &&
- ( [o_event modifierFlags] & NSControlKeyMask ) ) )
+ if( [o_event clickCount] > 1 )
{
- msg_Dbg( p_vout, "received NSRightMouseDown (generic method) or Ctrl clic" );
- [NSMenu popUpContextMenu: [[VLCMainMenu sharedInstance] voutMenu] withEvent: o_event forView: self];
+ /* multiple clicking */
+ [[VLCCoreInteraction sharedInstance] toggleFullscreen];
}
- vlc_object_release( p_vout );
+ }
+ else if( ( [o_event type] == NSRightMouseDown ) ||
+ ( ( [o_event type] == NSLeftMouseDown ) &&
+ ( [o_event modifierFlags] & NSControlKeyMask ) ) )
+ {
+ [NSMenu popUpContextMenu: [[VLCMainMenu sharedInstance] voutMenu] withEvent: o_event forView: self];
}
[super mouseDown: o_event];
@@ -217,12 +211,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (void)rightMouseDown:(NSEvent *)o_event
{
if( [o_event type] == NSRightMouseDown )
- {
- vout_thread_t * p_vout = getVout();
- if (p_vout)
- [NSMenu popUpContextMenu: [[VLCMainMenu sharedInstance] voutMenu] withEvent: o_event forView: self];
- vlc_object_release( p_vout );
- }
+ [NSMenu popUpContextMenu: [[VLCMainMenu sharedInstance] voutMenu] withEvent: o_event forView: self];
[super mouseDown: o_event];
}
@@ -230,14 +219,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (void)rightMouseUp:(NSEvent *)o_event
{
if( [o_event type] == NSRightMouseUp )
- {
- vout_thread_t * p_vout = getVout();
- if (p_vout)
- {
- [NSMenu popUpContextMenu: [[VLCMainMenu sharedInstance] voutMenu] withEvent: o_event forView: self];
- vlc_object_release( p_vout );
- }
- }
+ [NSMenu popUpContextMenu: [[VLCMainMenu sharedInstance] voutMenu] withEvent: o_event forView: self];
[super mouseUp: o_event];
}
More information about the vlc-commits
mailing list