Browse Source

Allow desktop settings to be changed on a single-screen system when a multi-screen configuration was previously set

This resolves Bug 1684
tags/r14.0.0
Timothy Pearson 5 years ago
parent
commit
408f22444f
2 changed files with 6 additions and 2 deletions
  1. +4
    -0
      kcontrol/background/bgrender.cpp
  2. +2
    -2
      kcontrol/background/bgsettings.cpp

+ 4
- 0
kcontrol/background/bgrender.cpp View File

@@ -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);


+ 2
- 2
kcontrol/background/bgsettings.cpp View File

@@ -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());


Loading…
Cancel
Save