[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.6/kdemultimedia/dragonplayer/src/app
From: Harald Sitter <sitter () kde ! org>
Date: 2011-01-28 0:26:39
Message-ID: 20110128002639.E9F8FAC8BB () svn ! kde ! org
[Download RAW message or body]
SVN commit 1217597 by sitter:
Also supress screen power management when watching a film.
Please note that this currently does not seem to work on 4.6 as powerdevil does not \
seem to actually trigger the appropriate action.
CCBUG: 243035
CCMAIL: drf@kde.org
M +1 -0 mainWindow.cpp
M +1 -0 mainWindow.h
M +5 -1 stateChange.cpp
--- branches/KDE/4.6/kdemultimedia/dragonplayer/src/app/mainWindow.cpp \
#1217596:1217597 @@ -98,6 +98,7 @@
, m_playDialog( 0 )
, m_stopScreenSaver( 0 )
, m_stopSleepCookie( -1 )
+ , m_stopScreenPowerMgmtCookie( -1 )
, m_toolbarIsHidden(false)
, m_statusbarIsHidden(false)
{
--- branches/KDE/4.6/kdemultimedia/dragonplayer/src/app/mainWindow.h #1217596:1217597
@@ -129,6 +129,7 @@
KNotificationRestrictions *m_stopScreenSaver;
int m_screensaverDisableCookie;
int m_stopSleepCookie;
+ int m_stopScreenPowerMgmtCookie;
bool m_toolbarIsHidden;
bool m_statusbarIsHidden;
--- branches/KDE/4.6/kdemultimedia/dragonplayer/src/app/stateChange.cpp \
#1217596:1217597 @@ -120,7 +120,8 @@
/// turn off screensaver
if( state == Phonon::PlayingState )
{
- m_stopSleepCookie = \
Solid::PowerManagement::beginSuppressingSleep(QLatin1String( "DragonPlayer: watching \
a film" )); + m_stopSleepCookie = \
Solid::PowerManagement::beginSuppressingSleep(QLatin1String( "watching a film" )); + \
m_stopScreenPowerMgmtCookie = \
Solid::PowerManagement::beginSuppressingScreenPowerManagement(QLatin1String( \
"watching a film" )); if (!m_stopScreenSaver)
m_stopScreenSaver = new \
KNotificationRestrictions(KNotificationRestrictions::ScreenSaver); }
@@ -129,6 +130,9 @@
//stop supressing sleep
Solid::PowerManagement::stopSuppressingSleep(m_stopSleepCookie);
+ //stop supressing screen power management
+ Solid::PowerManagement::stopSuppressingScreenPowerManagement(m_stopSleepCookie);
+
//stop disabling screensaver
delete m_stopScreenSaver; // It is always 0, I have been careful.
m_stopScreenSaver = 0;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic