[vlc-devel] [PATCH] macosx: non-fullscreen video windows hide mouse

Aleksandr Pasechnik al at megamicron.net
Sun Apr 12 22:07:22 CEST 2015


Allow the mouse cursor to be hidden in regular active video windws, in addition
to fullscreen videos.
---
 modules/gui/macosx/Windows.m | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/gui/macosx/Windows.m b/modules/gui/macosx/Windows.m
index 331da61..b0de912 100644
--- a/modules/gui/macosx/Windows.m
+++ b/modules/gui/macosx/Windows.m
@@ -640,6 +640,15 @@
 {
     if (b_fullscreen)
         [self recreateHideMouseTimer];
+    if (b_has_active_video && [self isKeyWindow]) {
+        if (NSPointInRect([theEvent locationInWindow],
+                          [[self videoView] convertRect:[[self videoView] bounds]
+                                                 toView:nil])) {
+            [self recreateHideMouseTimer];
+        } else {
+            [t_hide_mouse_timer invalidate];
+        }
+    }
 
     [super mouseMoved: theEvent];
 }
-- 
2.3.5




More information about the vlc-devel mailing list