Commit 1951da33 authored by Marvin Scholz's avatar Marvin Scholz Committed by Hugo Beauzée-Luyssen
Browse files

vout/macosx: remove mouse handling

This currently deadlocks the vout and should be done in the vout
window properly anyway.
parent baca970d
......@@ -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
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment