[vlc-commits] inhibit: start inhibiting power suspend as soon as input changes

Rafaël Carré git at videolan.org
Wed Jul 27 00:58:30 CEST 2011


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Tue Jul 26 18:55:04 2011 -0400| [031832b073a007703bc3239c4689562d0cf9439c] | committer: Rafaël Carré

inhibit: start inhibiting power suspend as soon as input changes

do not wait until a state change event

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

 modules/misc/inhibit.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/misc/inhibit.c b/modules/misc/inhibit.c
index bdb9644..bb976bc 100644
--- a/modules/misc/inhibit.c
+++ b/modules/misc/inhibit.c
@@ -280,7 +280,12 @@ static int InputChange( vlc_object_t *p_playlist, const char *var,
     }
     p_sys->p_input = VLC_OBJECT(playlist_CurrentInput( p_sys->p_playlist ));
     if( p_sys->p_input )
+    {
+        Inhibit( p_intf, FREEDESKTOP );
+        Inhibit( p_intf, GNOME );
+
         var_AddCallback( p_sys->p_input, "state", StateChange, p_intf );
+    }
 
     (void)var; (void)prev; (void)value; (void)p_playlist;
     return VLC_SUCCESS;



More information about the vlc-commits mailing list