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

Aleksandr Pasechnik git at videolan.org
Wed Apr 22 20:33:34 CEST 2015


vlc | branch: master | Aleksandr Pasechnik <al at megamicron.net> | Sun Apr 12 19:07:22 2015 +0000| [a98452a29ba64a2a5b1ac18d09aff3dff55dba6b] | committer: David Fuhrmann

macosx: non-fullscreen video windows hide mouse

Allow the mouse cursor to be hidden in regular active video windws, in addition
to fullscreen videos.

Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a98452a29ba64a2a5b1ac18d09aff3dff55dba6b
---

 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];
 }



More information about the vlc-commits mailing list