vlc/vlc-3.0 | branch: master | David Fuhrmann <[email protected]> | Tue Mar 31 09:11:08 2020 +0200| [4d98f418ee4e3ec40fec55e74b51f747356eda74] | committer: Marvin Scholz
caopengllayer: Forward mouse events to other views as well Other views might need the mouse events as well. Do the analog logic as in the old macosx vout module. Fixes steering of fullscreen panel. fixes #24560 Signed-off-by: Marvin Scholz <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4d98f418ee4e3ec40fec55e74b51f747356eda74 --- modules/video_output/caopengllayer.m | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m index 739a3dcb10..bf16358591 100644 --- a/modules/video_output/caopengllayer.m +++ b/modules/video_output/caopengllayer.m @@ -643,10 +643,10 @@ shouldInheritContentsScale:(CGFloat)newScale !(event.modifierFlags & NSControlKeyMask) && event.clickCount == 1) { vout_display_SendEventMousePressed(_vlc_vd, MOUSE_BUTTON_LEFT); - } else { - [super mouseDown:event]; } } + + [super mouseDown:event]; } /* Left mouse button up */ @@ -662,6 +662,8 @@ shouldInheritContentsScale:(CGFloat)newScale vout_display_SendEventMouseReleased(_vlc_vd, MOUSE_BUTTON_LEFT); } } + + [super mouseUp:event]; } /* Middle mouse button down */ @@ -670,9 +672,9 @@ shouldInheritContentsScale:(CGFloat)newScale @synchronized(self) { if (_vlc_vd) vout_display_SendEventMousePressed(_vlc_vd, MOUSE_BUTTON_CENTER); - else - [super otherMouseDown:event]; } + + [super otherMouseDown:event]; } /* Middle mouse button up */ @@ -681,17 +683,15 @@ shouldInheritContentsScale:(CGFloat)newScale @synchronized(self) { if (_vlc_vd) vout_display_SendEventMouseReleased(_vlc_vd, MOUSE_BUTTON_CENTER); - else - [super otherMouseUp:event]; } + + [super otherMouseUp:event]; } -/* Mouse moved */ -- (void)mouseMoved:(NSEvent *)event +- (void)mouseMovedInternal:(NSEvent *)event { @synchronized(self) { if (!_vlc_vd) { - [super mouseMoved:event]; return; } @@ -709,22 +709,32 @@ shouldInheritContentsScale:(CGFloat)newScale } } +/* Mouse moved */ +- (void)mouseMoved:(NSEvent *)event +{ + [self mouseMovedInternal:event]; + [super mouseMoved:event]; +} + /* Mouse moved while clicked */ - (void)mouseDragged:(NSEvent *)event { - [self mouseMoved:event]; + [self mouseMovedInternal:event]; + [super mouseDragged:event]; } /* Mouse moved while center-clicked */ - (void)otherMouseDragged:(NSEvent *)event { - [self mouseMoved:event]; + [self mouseMovedInternal:event]; + [super otherMouseDragged:event]; } /* Mouse moved while right-clicked */ - (void)rightMouseDragged:(NSEvent *)event { - [self mouseMoved:event]; + [self mouseMovedInternal:event]; + [super rightMouseDragged:event]; } @end _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
