From db36045cd98dde367fca9b1b825530bfe1de329c Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Mon, 6 Feb 2012 22:40:48 +0200 Subject: [PATCH] Start dbus always, move inhibit and dbus startup to vlc --- bin/vlc.c | 4 ++++ src/libvlc.c | 16 ---------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/bin/vlc.c b/bin/vlc.c index 2b18719415..057266b128 100644 --- a/bin/vlc.c +++ b/bin/vlc.c @@ -208,6 +208,10 @@ int main( int i_argc, const char *ppsz_argv[] ) #if !defined (HAVE_MAEMO) && !defined __APPLE__ && !defined (__OS2__) libvlc_add_intf (vlc, "globalhotkeys,none"); +#endif +#ifdef HAVE_DBUS + libvlc_add_intf (vlc, "dbus,none"); + libvlc_add_intf (vlc, "inhibit,none"); #endif if (libvlc_add_intf (vlc, NULL)) goto out; diff --git a/src/libvlc.c b/src/libvlc.c index c0e37f7a22..237267b1eb 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -646,22 +646,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, */ intf_Create( p_libvlc, "hotkeys,none" ); -#ifdef HAVE_DBUS - /* loads dbus control interface if in one-instance mode - * we do it only when playlist exists, because dbus module needs it */ - if( var_InheritBool( p_libvlc, "one-instance" ) - || ( var_InheritBool( p_libvlc, "one-instance-when-started-from-file" ) - && var_InheritBool( p_libvlc, "started-from-file" ) ) ) - intf_Create( p_libvlc, "dbus,none" ); - -# if !defined (HAVE_MAEMO) - /* Prevents the power management daemon from suspending the system - * when VLC is active */ - if( var_InheritBool( p_libvlc, "inhibit" ) > 0 ) - intf_Create( p_libvlc, "inhibit,none" ); -# endif -#endif - if( var_InheritBool( p_libvlc, "file-logging" ) #ifdef HAVE_SYSLOG_H && !var_InheritBool( p_libvlc, "syslog" ) -- 2.39.2