Add config option for keeping pixmaps of hidden windows up to date.

svn path=/trunk/KDE/kdebase/workspace/; revision=736174
This commit is contained in:
Rivo Laks 2007-11-13 16:40:28 +00:00
parent ce20cf0625
commit 9043373394
3 changed files with 14 additions and 3 deletions

View file

@ -37,6 +37,7 @@ KWinAdvancedCompositingOptions::KWinAdvancedCompositingOptions(QWidget* parent,
connect(ui.compositingType, SIGNAL(currentIndexChanged(int)), this, SLOT(compositingModeChanged()));
connect(ui.compositingType, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
connect(ui.updateThumbnails, SIGNAL(toggled(bool)), this, SLOT(changed()));
connect(ui.glMode, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
connect(ui.glTextureFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
connect(ui.glDirect, SIGNAL(toggled(bool)), this, SLOT(changed()));
@ -89,6 +90,7 @@ void KWinAdvancedCompositingOptions::load()
KConfigGroup config(mKWinConfig, "Compositing");
QString backend = config.readEntry("Backend", "OpenGL");
ui.compositingType->setCurrentIndex((backend == "XRender") ? 1 : 0);
ui.updateThumbnails->setChecked(config.readEntry("HiddenPreviews", 0) == 3);
QString glMode = config.readEntry("GLMode", "TFP");
ui.glMode->setCurrentIndex((glMode == "TFP") ? 0 : ((glMode == "SHM") ? 1 : 2));
@ -112,6 +114,7 @@ void KWinAdvancedCompositingOptions::save()
mPreviousConfig = config.entryMap();
config.writeEntry("Backend", (ui.compositingType->currentIndex() == 0) ? "OpenGL" : "XRender");
config.writeEntry("HiddenPreviews", ui.updateThumbnails->isChecked() ? 3 : 0);
QString glModes[] = { "TFP", "SHM", "Fallback" };
config.writeEntry("GLMode", glModes[ui.glMode->currentIndex()]);

View file

@ -6,7 +6,7 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<height>305</height>
</rect>
</property>
<layout class="QVBoxLayout" >
@ -35,6 +35,13 @@
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="updateThumbnails" >
<property name="text" >
<string>Keep thumbnails of hidden windows up to date</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="glGroup" >
<property name="title" >

View file

@ -180,8 +180,6 @@ unsigned long Options::updateSettings()
config=KConfigGroup(_config,"Compositing");
refreshRate = config.readEntry( "RefreshRate", 0 );
const HiddenPreviews hps[] = { HiddenPreviewsNever, HiddenPreviewsKeep, HiddenPreviewUpdate, HiddenPreviewsActive };
hiddenPreviews = hps[ qBound( 0, config.readEntry( "HiddenPreviews", 0 ), 3 ) ];
// Read button tooltip animation effect from kdeglobals
// Since we want to allow users to enable window decoration tooltips
@ -233,6 +231,9 @@ void Options::reloadCompositingSettings(const CompositingPrefs& prefs)
glStrictBinding = config.readEntry( "GLStrictBinding", prefs.strictBinding());
xrenderSmoothScale = config.readEntry("XRenderSmoothScale", false );
const HiddenPreviews hps[] = { HiddenPreviewsNever, HiddenPreviewsKeep, HiddenPreviewUpdate, HiddenPreviewsActive };
hiddenPreviews = hps[ qBound( 0, config.readEntry( "HiddenPreviews", 0 ), 3 ) ];
}