-rw-r--r-- | core/launcher/desktop.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 986ae5d..2ea6d27 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -286,64 +286,65 @@ public: } void setIntervalsAC( int i1, int i2, int i3 ) { Config config( "qpe" ); config.setGroup( "Screensaver" ); int v[ 4 ]; i1 = ssi( i1, config, "DimAC", "Interval_DimAC", 30 ); i2 = ssi( i2, config, "LightOffAC", "Interval_LightOffAC", 20 ); i3 = ssi( i3, config, "", "IntervalAC", 60 ); //qDebug("screen saver intervals: %d %d %d", i1, i2, i3); v [ 0 ] = QMAX( 1000 * i1, 100 ); v [ 1 ] = QMAX( 1000 * i2, 100 ); v [ 2 ] = QMAX( 1000 * i3, 100 ); v [ 3 ] = 0; m_enable_dim_ac = ( ( i1 != 0 ) ? config.readNumEntry ( "DimAC", 1 ) : false ); m_enable_lightoff_ac = ( ( i2 != 0 ) ? config.readNumEntry ( "LightOffAC", 1 ) : false ); m_enable_onlylcdoff_ac = config.readNumEntry ( "LcdOffOnlyAC", 0 ); m_disable_apm_ac = config.readNumEntry ( "NoApmAC", 0 ); if ( !i1 && !i2 && !i3 ) QWSServer::setScreenSaverInterval( 0 ); else QWSServer::setScreenSaverIntervals( v ); } void setInterval ( int interval ) { setIntervals ( -1, -1, interval ); + setIntervalsAC ( -1, -1, interval ); } void setMode ( int mode ) { if ( mode > m_disable_suspend ) setInterval( -1 ); m_disable_suspend = mode; } void setBacklight ( int bright ) { // Read from config Config config ( "qpe" ); config. setGroup ( "Screensaver" ); m_backlight_normal = config. readNumEntry ( "Brightness", 255 ); setBacklightInternal ( bright ); } private: void setBacklightInternal ( int bright ) { if ( bright == -3 ) { // Forced on m_backlight_forcedoff = false; bright = -1; } if ( m_backlight_forcedoff && bright != -2 ) return ; if ( bright == -2 ) { // Toggle between off and on bright = m_backlight_current ? 0 : -1; |