]> git.sesse.net Git - vlc/commitdiff
skin2(Win32): add support for mouse wheel in fullscreen mode
authorErwan Tulou <erwan10@videolan.org>
Wed, 7 Jul 2010 13:36:27 +0000 (15:36 +0200)
committerErwan Tulou <erwan10@videolan.org>
Wed, 7 Jul 2010 13:54:54 +0000 (15:54 +0200)
fix #3862

modules/gui/skins2/src/vout_manager.hpp

index 999990d6a6a34c5bda6f1a5918b9d16a46e2a816..095f25c2d522aad27dda50dce68a5923ee4696fa 100644 (file)
 
 #include <vlc_vout.h>
 #include <vlc_vout_window.h>
+#include <vlc_keys.h>
 #include "../utils/position.hpp"
 #include "../commands/cmd_generic.hpp"
 #include "../controls/ctrl_video.hpp"
 #include "../events/evt_key.hpp"
+#include "../events/evt_scroll.hpp"
 
 class VarBool;
 class GenericWindow;
@@ -74,6 +76,17 @@ public:
             var_SetInteger( getIntf()->p_libvlc, "key-pressed",
                              rEvtKey.getModKey() );
     }
+
+    virtual void processEvent( EvtScroll &rEvtScroll )
+    {
+        // scroll events sent to core as hotkeys
+        int i_vlck = 0;
+        i_vlck |= rEvtScroll.getMod();
+        i_vlck |= ( rEvtScroll.getDirection() == EvtScroll::kUp ) ?
+                  KEY_MOUSEWHEELUP : KEY_MOUSEWHEELDOWN;
+
+        var_SetInteger( getIntf()->p_libvlc, "key-pressed", i_vlck );
+    }
 };