[vlc-commits] XCB/global: no need to keep track of VLC actions

Rémi Denis-Courmont git at videolan.org
Sat Feb 19 15:13:50 CET 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 19 16:11:29 2011 +0200| [a83cf23ff42157141af3ccae47852a209ca809f0] | committer: Rémi Denis-Courmont

XCB/global: no need to keep track of VLC actions

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

 modules/control/globalhotkeys/xcb.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/modules/control/globalhotkeys/xcb.c b/modules/control/globalhotkeys/xcb.c
index 17d51b6..2ad739b 100644
--- a/modules/control/globalhotkeys/xcb.c
+++ b/modules/control/globalhotkeys/xcb.c
@@ -62,7 +62,7 @@ typedef struct
     xcb_keycode_t *p_keys;
 #endif
     unsigned      i_modifier;
-    int           i_action;
+    uint32_t      i_vlc;
 } hotkey_mapping_t;
 
 struct intf_sys_t
@@ -307,7 +307,6 @@ static bool Mapping( intf_thread_t *p_intf )
             p_hotkey->psz_action != NULL;
             p_hotkey++ )
     {
-        const int i_vlc_action = p_hotkey->i_action;
         char varname[12 + strlen( p_hotkey->psz_action )];
         sprintf( varname, "global-key-%s", p_hotkey->psz_action );
 
@@ -357,7 +356,7 @@ static bool Mapping( intf_thread_t *p_intf )
             p_map->p_keys = p_keys;
 #endif
             p_map->i_modifier = i_modifier|i_ignored;
-            p_map->i_action = i_vlc_action;
+            p_map->i_vlc = i_vlc_key;
             active = true;
         }
     }
@@ -432,8 +431,8 @@ static void *Thread( void *p_data )
                 if( p_map->i_x11 == e->detail &&
                     p_map->i_modifier == e->state )
                 {
-                    var_SetInteger( p_intf->p_libvlc, "key-action",
-                            p_map->i_action );
+                    var_SetInteger( p_intf->p_libvlc, "global-key-pressed",
+                                    p_map->i_vlc );
                     break;
                 }
 #else
@@ -442,8 +441,8 @@ static void *Thread( void *p_data )
                 if( p_map->p_keys[j] == e->detail &&
                     p_map->i_modifier == e->state )
                 {
-                    var_SetInteger( p_intf->p_libvlc, "key-action",
-                            p_map->i_action );
+                    var_SetInteger( p_intf->p_libvlc, "global-key-pressed",
+                                    p_map->i_vlc );
                     loop_break = true;
                     break;
                 }



More information about the vlc-commits mailing list