[vlc-commits] windowed mac plugin: show toolbar only when cursor is within view

Felix Paul Kühne git at videolan.org
Fri Jan 4 12:41:30 CET 2013


npapi-vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Jan  4 12:41:25 2013 +0100| [96aca36d4f8a1830900ff5a1a1a43fb6b4e360b4] | committer: Felix Paul Kühne

windowed mac plugin: show toolbar only when cursor is within view

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

 npapi/vlcplugin_mac.mm |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/npapi/vlcplugin_mac.mm b/npapi/vlcplugin_mac.mm
index 3a9c239..7969f5d 100644
--- a/npapi/vlcplugin_mac.mm
+++ b/npapi/vlcplugin_mac.mm
@@ -199,7 +199,7 @@ int  VlcPluginMac::get_fullscreen()
 
 void VlcPluginMac::set_toolbar_visible(bool b_value)
 {
-    controllerLayer.opaque = (float)b_value;
+    [controllerLayer setHidden: !b_value];
 }
 
 bool VlcPluginMac::get_toolbar_visible()
@@ -303,6 +303,16 @@ bool VlcPluginMac::handle_event(void *event)
 
             return true;
         }
+        case NPCocoaEventMouseEntered:
+        {
+            set_toolbar_visible(true);
+            return true;
+        }
+        case NPCocoaEventMouseExited:
+        {
+            set_toolbar_visible(false);
+            return true;
+        }
         case NPCocoaEventKeyUp:
         case NPCocoaEventKeyDown:
         case NPCocoaEventFocusChanged:



More information about the vlc-commits mailing list