diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-11-18 11:30:25 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-11-18 11:30:25 -0600 |
commit | 4527039a04b457d379cd5e0b0a3785d7b2cce9ac (patch) | |
tree | 8d490acbab63ae8d6d2b30e9be650a0693f04ff2 /twin/kcmtwin | |
parent | d9dd06564ff72c7cc88e5a2f2d073468fb55942c (diff) | |
download | tdebase-4527039a04b457d379cd5e0b0a3785d7b2cce9ac.tar.gz tdebase-4527039a04b457d379cd5e0b0a3785d7b2cce9ac.zip |
Add compositor option to enable/disable blurring of transparent window backgrounds
Diffstat (limited to 'twin/kcmtwin')
-rw-r--r-- | twin/kcmtwin/twinoptions/windows.cpp | 19 | ||||
-rw-r--r-- | twin/kcmtwin/twinoptions/windows.h | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/twin/kcmtwin/twinoptions/windows.cpp b/twin/kcmtwin/twinoptions/windows.cpp index edfec1628..83424e55c 100644 --- a/twin/kcmtwin/twinoptions/windows.cpp +++ b/twin/kcmtwin/twinoptions/windows.cpp @@ -1347,8 +1347,11 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, useOpenGL = new TQCheckBox(i18n("Use OpenGL compositor (best performance)"),tGroup); vLay->addWidget(useOpenGL); + blurBackground = new TQCheckBox(i18n("Blur the background of transparent windows"),tGroup); + vLay->addWidget(blurBackground); if (TDECompositor != "compton-tde") { useOpenGL->hide(); + blurBackground->hide(); } vLay->addStretch(); @@ -1362,6 +1365,9 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, vLay2->addWidget(useShadows); useShadowsOnMenuWindows = new TQCheckBox(i18n("Use shadows on menus (requires menu fade effect to be disabled in the Styles module)"),sGroup); vLay2->addWidget(useShadowsOnMenuWindows); + if (TDECompositor != "compton-tde") { + useShadowsOnMenuWindows->hide(); + } vLay2->addSpacing(11); @@ -1477,6 +1483,8 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, connect(keepAboveAsActive, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); connect(disableARGB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); connect(useOpenGL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); + connect(useOpenGL, TQT_SIGNAL(toggled(bool)), blurBackground, TQT_SLOT(setEnabled(bool))); + connect(blurBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); connect(removeShadowsOnResize, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); @@ -1513,6 +1521,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); connect(disableARGB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); connect(useOpenGL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); + connect(blurBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); @@ -1586,6 +1595,8 @@ void KTranslucencyConfig::load( void ) disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",FALSE)); useOpenGL->setChecked(conf_.readBoolEntry("useOpenGL",FALSE)); + blurBackground->setChecked(conf_.readBoolEntry("blurBackground",FALSE)); + blurBackground->setEnabled(useOpenGL->isChecked()); useShadows->setChecked(conf_.readEntry("Compmode","").compare("CompClientShadows") == 0); useShadowsOnMenuWindows->setChecked(conf_.readBoolEntry("ShadowsOnMenuWindows",TRUE)); @@ -1658,6 +1669,7 @@ void KTranslucencyConfig::save( void ) conf_->writeEntry("ShadowsOnMenuWindows",useShadowsOnMenuWindows->isChecked()); conf_->writeEntry("DisableARGB",disableARGB->isChecked()); conf_->writeEntry("useOpenGL",useOpenGL->isChecked()); + conf_->writeEntry("blurBackground",blurBackground->isChecked()); conf_->writeEntry("ShadowOffsetY",-1*shadowTopOffset->value()); conf_->writeEntry("ShadowOffsetX",-1*shadowLeftOffset->value()); @@ -1720,6 +1732,13 @@ void KTranslucencyConfig::save( void ) stream << "backend = \"" << (useOpenGL->isChecked()?"glx":"xrender") << "\";\n"; stream << "vsync = \"" << (useOpenGL->isChecked()?"opengl":"none") << "\";\n"; + stream << "blur-background = \"" << ((blurBackground->isChecked() && useOpenGL->isChecked())?"true":"false") << "\";\n"; + stream << "blur-background-fixed = true;\n"; + stream << "blur-background-exclude = [\n"; + stream << " \"window_type = 'dock'\",\n"; + stream << " \"window_type = 'desktop'\"\n"; + stream << "];\n"; + // Global settings stream << "no-dock-shadow = true;\n"; stream << "no-dnd-shadow = true;\n"; diff --git a/twin/kcmtwin/twinoptions/windows.h b/twin/kcmtwin/twinoptions/windows.h index 1cb4d16e8..bafebdab2 100644 --- a/twin/kcmtwin/twinoptions/windows.h +++ b/twin/kcmtwin/twinoptions/windows.h @@ -260,6 +260,7 @@ private: TQCheckBox *keepAboveAsActive; TQCheckBox *disableARGB; TQCheckBox *useOpenGL; + TQCheckBox *blurBackground; TQCheckBox *fadeInWindows; TQCheckBox *fadeInMenuWindows; TQCheckBox *fadeOnOpacityChange; |