summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-05 23:38:01 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-05 23:38:01 -0500
commit408f22444f371c13ef48f677de855505c9a3d741 (patch)
tree92d6d13aae3b7b4b24472a3fac946f47e74faebb /kcontrol
parent699217f5ac7e8ccf5a023fb13b3a26d38c1d847b (diff)
downloadtdebase-408f22444f371c13ef48f677de855505c9a3d741.tar.gz
tdebase-408f22444f371c13ef48f677de855505c9a3d741.zip
Allow desktop settings to be changed on a single-screen system when a multi-screen configuration was previously set
This resolves Bug 1684
Diffstat (limited to 'kcontrol')
-rw-r--r--kcontrol/background/bgrender.cpp4
-rw-r--r--kcontrol/background/bgsettings.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/kcontrol/background/bgrender.cpp b/kcontrol/background/bgrender.cpp
index 5e9e4b82f..d8cc53c9a 100644
--- a/kcontrol/background/bgrender.cpp
+++ b/kcontrol/background/bgrender.cpp
@@ -1208,6 +1208,10 @@ void KVirtualBGRenderer::initRenderers()
m_bCommonScreen = m_pConfig->readBoolEntry("CommonScreen", _defCommonScreen);
m_numRenderers = m_bDrawBackgroundPerScreen ? TDEApplication::desktop()->numScreens() : 1;
+ if (m_numRenderers < 2) {
+ // Only one screen is currently available; deactivate per-screen rendering but do not overwrite multi-screen settings
+ m_bDrawBackgroundPerScreen = false;
+ }
m_bFinished.resize(m_numRenderers);
m_bFinished.fill(false);
diff --git a/kcontrol/background/bgsettings.cpp b/kcontrol/background/bgsettings.cpp
index f29eeacf4..1ee452ac2 100644
--- a/kcontrol/background/bgsettings.cpp
+++ b/kcontrol/background/bgsettings.cpp
@@ -420,7 +420,7 @@ KBackgroundSettings::KBackgroundSettings(int desk, int screen, bool drawBackgrou
KBackgroundProgram()
{
dirty = false; hashdirty = true;
- m_bDrawBackgroundPerScreen = drawBackgroundPerScreen;
+ m_bDrawBackgroundPerScreen = drawBackgroundPerScreen;
m_Desk = desk;
m_Screen = screen;
m_bEnabled = true;
@@ -1227,7 +1227,7 @@ void TDEGlobalBackgroundSettings::readSettings()
m_bExport = m_pConfig->readBoolEntry("Export", _defExport);
m_bLimitCache = m_pConfig->readBoolEntry("LimitCache", _defLimitCache);
m_CacheSize = m_pConfig->readNumEntry("CacheSize", _defCacheSize);
-
+
m_Names.clear();
NETRootInfo info( tqt_xdisplay(), NET::DesktopNames | NET::NumberOfDesktops );
m_bDrawBackgroundPerScreen.resize(info.numberOfDesktops());