Display a warning message when compositing is enabled during KDE
failsafe mode. BUG: 197874 svn path=/trunk/KDE/kdebase/workspace/; revision=987757icc-effect-5.14.5
parent
9842c3247e
commit
d4647a3fbc
|
@ -362,6 +362,8 @@ void KWinCompositingConfig::loadGeneralTab()
|
||||||
|
|
||||||
void KWinCompositingConfig::setupCompositingState( bool active, bool enabled )
|
void KWinCompositingConfig::setupCompositingState( bool active, bool enabled )
|
||||||
{
|
{
|
||||||
|
if( getenv( "KDE_FAILSAFE" ))
|
||||||
|
enabled = false;
|
||||||
// compositing state
|
// compositing state
|
||||||
QString stateIcon;
|
QString stateIcon;
|
||||||
QString stateText;
|
QString stateText;
|
||||||
|
@ -633,6 +635,17 @@ void KWinCompositingConfig::save()
|
||||||
|
|
||||||
configChanged(advancedChanged);
|
configChanged(advancedChanged);
|
||||||
|
|
||||||
|
// This assumes that this KCM is running with the same environment variables as KWin
|
||||||
|
// TODO: Detect KWIN_COMPOSE=N as well
|
||||||
|
if( getenv( "KDE_FAILSAFE" ) && ui.useCompositing->isChecked() )
|
||||||
|
{
|
||||||
|
KMessageBox::sorry( this, i18n(
|
||||||
|
"Your settings have been saved but as KDE is currently running in failsafe"
|
||||||
|
"mode desktop effects cannot be enabled at this time.\n\n"
|
||||||
|
"Please exit failsafe mode to enable desktop effects." ));
|
||||||
|
m_showConfirmDialog = false; // Dangerous but there is no way to test if failsafe mode
|
||||||
|
}
|
||||||
|
|
||||||
if(m_showConfirmDialog)
|
if(m_showConfirmDialog)
|
||||||
{
|
{
|
||||||
m_showConfirmDialog = false;
|
m_showConfirmDialog = false;
|
||||||
|
@ -677,7 +690,7 @@ void KWinCompositingConfig::configChanged(bool reinitCompositing)
|
||||||
// such effects are enabled but not returned by DBus method loadedEffects
|
// such effects are enabled but not returned by DBus method loadedEffects
|
||||||
message = QDBusMessage::createMethodCall( "org.kde.kwin", "/KWin", "org.kde.KWin", "loadedEffects" );
|
message = QDBusMessage::createMethodCall( "org.kde.kwin", "/KWin", "org.kde.KWin", "loadedEffects" );
|
||||||
QDBusMessage reply = QDBusConnection::sessionBus().call( message );
|
QDBusMessage reply = QDBusConnection::sessionBus().call( message );
|
||||||
if( reply.type() == QDBusMessage::ReplyMessage && enabledAfter )
|
if( reply.type() == QDBusMessage::ReplyMessage && enabledAfter && !getenv( "KDE_FAILSAFE" ))
|
||||||
{
|
{
|
||||||
QStringList loadedEffects = reply.arguments()[0].toStringList();
|
QStringList loadedEffects = reply.arguments()[0].toStringList();
|
||||||
QStringList effects = effectConfig.keyList();
|
QStringList effects = effectConfig.keyList();
|
||||||
|
|
Loading…
Reference in New Issue