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
pull/2/head
Timothy Pearson 7 years ago
parent
commit
408f22444f
  1. 4
      kcontrol/background/bgrender.cpp
  2. 4
      kcontrol/background/bgsettings.cpp

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

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

Loading…
Cancel
Save