[vlc-commits] [Git][videolan/vlc][master] vout/macosx: remove mouse handling

Hugo Beauzée-Luyssen gitlab at videolan.org
Thu Jun 3 09:47:25 UTC 2021



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
1951da33 by Marvin Scholz at 2021-06-03T07:36:11+00:00
vout/macosx: remove mouse handling

This currently deadlocks the vout and should be done in the vout
window properly anyway.

- - - - -


1 changed file:

- modules/video_output/macosx.m


Changes:

=====================================
modules/video_output/macosx.m
=====================================
@@ -711,91 +711,7 @@ static void OpenglSwap (vlc_gl_t *gl)
 #pragma mark -
 #pragma mark Mouse handling
 
-- (void)mouseDown:(NSEvent *)o_event
-{
-    @synchronized (self) {
-        if (vd) {
-            if ([o_event type] == NSLeftMouseDown && !([o_event modifierFlags] &  NSControlKeyMask)) {
-                if ([o_event clickCount] <= 1)
-                    vout_display_SendEventMousePressed (vd, MOUSE_BUTTON_LEFT);
-            }
-        }
-    }
-
-    [super mouseDown:o_event];
-}
-
-- (void)otherMouseDown:(NSEvent *)o_event
-{
-    @synchronized (self) {
-        if (vd)
-            vout_display_SendEventMousePressed (vd, MOUSE_BUTTON_CENTER);
-    }
-
-    [super otherMouseDown: o_event];
-}
-
-- (void)mouseUp:(NSEvent *)o_event
-{
-    @synchronized (self) {
-        if (vd) {
-            if ([o_event type] == NSLeftMouseUp)
-                vout_display_SendEventMouseReleased (vd, MOUSE_BUTTON_LEFT);
-        }
-    }
-
-    [super mouseUp: o_event];
-}
-
-- (void)otherMouseUp:(NSEvent *)o_event
-{
-    @synchronized (self) {
-        if (vd)
-            vout_display_SendEventMouseReleased (vd, MOUSE_BUTTON_CENTER);
-    }
-
-    [super otherMouseUp: o_event];
-}
-
-- (void)mouseMoved:(NSEvent *)o_event
-{
-    /* on HiDPI displays, the point bounds don't equal the actual pixel based bounds */
-    NSPoint ml = [self convertPoint: [o_event locationInWindow] fromView: nil];
-    NSRect videoRect = [self bounds];
-    BOOL b_inside = [self mouse: ml inRect: videoRect];
-
-    ml = [self convertPointToBacking: ml];
-    videoRect = [self convertRectToBacking: videoRect];
-
-    if (b_inside) {
-        @synchronized (self) {
-            if (vd) {
-                vout_display_SendMouseMovedDisplayCoordinates(vd,
-                                                              (int)ml.x, videoRect.size.height - (int)ml.y);
-            }
-        }
-    }
-
-    [super mouseMoved: o_event];
-}
-
-- (void)mouseDragged:(NSEvent *)o_event
-{
-    [self mouseMoved: o_event];
-    [super mouseDragged: o_event];
-}
-
-- (void)otherMouseDragged:(NSEvent *)o_event
-{
-    [self mouseMoved: o_event];
-    [super otherMouseDragged: o_event];
-}
-
-- (void)rightMouseDragged:(NSEvent *)o_event
-{
-    [self mouseMoved: o_event];
-    [super rightMouseDragged: o_event];
-}
+#warning Missing mouse handling, must be implemented in Vout Window
 
 - (BOOL)acceptsFirstResponder
 {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1951da33fa414ef3ce05668ee43cef5427925151

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1951da33fa414ef3ce05668ee43cef5427925151
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list