From 1951da33fa414ef3ce05668ee43cef5427925151 Mon Sep 17 00:00:00 2001
From: Marvin Scholz <epirat07@gmail.com>
Date: Tue, 1 Jun 2021 15:18:51 +0200
Subject: [PATCH] vout/macosx: remove mouse handling

This currently deadlocks the vout and should be done in the vout
window properly anyway.
---
 modules/video_output/macosx.m | 86 +----------------------------------
 1 file changed, 1 insertion(+), 85 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 9420abaf90fe..727fcbe4b957 100644
--- a/modules/video_output/macosx.m
+++ b/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
 {
-- 
GitLab