From f30c11ddf493444579025e660ae50c4bb0dd9e3c Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 6 May 2020 22:17:22 -0700 Subject: [PATCH] Properly fix SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH on macOS VTRenderer --- app/streaming/video/ffmpeg-renderers/vt.mm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/streaming/video/ffmpeg-renderers/vt.mm b/app/streaming/video/ffmpeg-renderers/vt.mm index 25628803..c23b758e 100644 --- a/app/streaming/video/ffmpeg-renderers/vt.mm +++ b/app/streaming/video/ffmpeg-renderers/vt.mm @@ -16,6 +16,19 @@ #import #import +@interface VTView : NSView +- (NSView *)hitTest:(NSPoint)point; +@end + +@implementation VTView + +- (NSView *)hitTest:(NSPoint)point { + Q_UNUSED(point); + return nil; +} + +@end + class VTRenderer : public IFFmpegRenderer { public: @@ -398,7 +411,7 @@ public: // SDL adds its own content view to listen for events. // We need to add a subview for our display layer. NSView* contentView = info.info.cocoa.window.contentView; - m_StreamView = [[NSView alloc] initWithFrame:contentView.bounds]; + m_StreamView = [[VTView alloc] initWithFrame:contentView.bounds]; m_DisplayLayer = [[AVSampleBufferDisplayLayer alloc] init]; m_DisplayLayer.bounds = m_StreamView.bounds;