[vlc-commits] xcb/global: use autorun to start
Rémi Denis-Courmont
git at videolan.org
Sun Nov 22 16:04:39 CET 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Nov 20 20:04:58 2020 +0200| [c96462163e2d5c2a1634820179ff2fe20e09f2f7] | committer: Rémi Denis-Courmont
xcb/global: use autorun to start
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c96462163e2d5c2a1634820179ff2fe20e09f2f7
---
bin/vlc.c | 3 ---
modules/control/globalhotkeys/xcb.c | 9 +++++++++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/bin/vlc.c b/bin/vlc.c
index 4134ee5bb0..4fa4acb589 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -235,9 +235,6 @@ int main(int argc, const char *argv[])
libvlc_set_app_id (vlc, "org.VideoLAN.VLC", PACKAGE_VERSION, PACKAGE_NAME);
libvlc_set_user_agent (vlc, "VLC media player", "VLC/"PACKAGE_VERSION);
-#if !defined (__OS2__)
- libvlc_add_intf (vlc, "globalhotkeys,none");
-#endif
if (libvlc_add_intf (vlc, NULL))
{
fprintf(stderr, "%s: cannot start any interface. Exiting.\n", argv[0]);
diff --git a/modules/control/globalhotkeys/xcb.c b/modules/control/globalhotkeys/xcb.c
index 32b2d312c6..fa10b308c0 100644
--- a/modules/control/globalhotkeys/xcb.c
+++ b/modules/control/globalhotkeys/xcb.c
@@ -43,6 +43,11 @@
static int Open( vlc_object_t *p_this );
static void Close( vlc_object_t *p_this );
+static void AutoRun(libvlc_int_t *libvlc)
+{
+ intf_Create(libvlc, MODULE_STRING);
+}
+
/*****************************************************************************
* Module descriptor
*****************************************************************************/
@@ -54,6 +59,10 @@ vlc_module_begin()
set_capability( "interface", 0 )
set_callbacks( Open, Close )
add_shortcut( "globalhotkeys" )
+
+ add_submodule()
+ set_capability("autorun", 10)
+ set_callback(AutoRun)
vlc_module_end()
typedef struct
More information about the vlc-commits
mailing list