]> git.sesse.net Git - vlc/commitdiff
skins2: For playlist controls, keys to be forwarded to vlc core
authorErwan Tulou <erwan10@videolan.org>
Fri, 19 Mar 2010 10:39:37 +0000 (11:39 +0100)
committerErwan Tulou <erwan10@videolan.org>
Fri, 19 Mar 2010 10:51:43 +0000 (11:51 +0100)
the playlist control entirely redefines key processing (arrows, enter, ...).
Yet, for keys not processed, forwarding them to vlc core is desirable.
For instance, that enables n(ext) and p(revious) when focus is on the playlist,
which is something users can expect to be working.

modules/gui/skins2/controls/ctrl_tree.cpp

index 31d9cb503e484d75cf2ed306a0cd5bae9e93a372..30482547163ebfb869fdf97a25590176c5856abf 100644 (file)
@@ -329,6 +329,14 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
             notifyLayout();
             return;
         }
+        else
+        {
+            // other keys to be forwarded to vlc core
+            EvtKey& rEvtKey = (EvtKey&)rEvent;
+            var_SetInteger( getIntf()->p_libvlc, "key-pressed",
+                            rEvtKey.getModKey() );
+            return;
+        }
 
 
         for( it = m_flat ? m_rTree.firstLeaf() : m_rTree.begin();