From a2393a5c847a5d0bfd0f259f2212e04e2b657430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 1 Dec 2014 16:38:16 +0100 Subject: [PATCH] [kcmkwin/screenedges] Drop check whether Compositing is enabled Reading the configured value might be wrong, so it's better to not check at all. REVIEW: 121312 --- kcmkwin/kwinscreenedges/main.cpp | 37 +++++++++++--------------------- 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/kcmkwin/kwinscreenedges/main.cpp b/kcmkwin/kwinscreenedges/main.cpp index 54c8cd8153..997e87bb86 100644 --- a/kcmkwin/kwinscreenedges/main.cpp +++ b/kcmkwin/kwinscreenedges/main.cpp @@ -392,33 +392,22 @@ void KWinScreenEdgesConfig::monitorDefaults() void KWinScreenEdgesConfig::monitorShowEvent() { // Check if they are enabled - KConfigGroup config(m_config, "Compositing"); - if (config.readEntry("Enabled", true)) { - // Compositing enabled - config = KConfigGroup(m_config, "Plugins"); + KConfigGroup config(m_config, "Plugins"); - // Present Windows - bool enabled = effectEnabled(BuiltInEffect::PresentWindows, config); - monitorItemSetEnabled(int(PresentWindowsCurrent), enabled); - monitorItemSetEnabled(int(PresentWindowsAll), enabled); + // Present Windows + bool enabled = effectEnabled(BuiltInEffect::PresentWindows, config); + monitorItemSetEnabled(int(PresentWindowsCurrent), enabled); + monitorItemSetEnabled(int(PresentWindowsAll), enabled); - // Desktop Grid - enabled = effectEnabled(BuiltInEffect::DesktopGrid, config); - monitorItemSetEnabled(int(DesktopGrid), enabled); + // Desktop Grid + enabled = effectEnabled(BuiltInEffect::DesktopGrid, config); + monitorItemSetEnabled(int(DesktopGrid), enabled); - // Desktop Cube - enabled = effectEnabled(BuiltInEffect::Cube, config); - monitorItemSetEnabled(int(Cube), enabled); - monitorItemSetEnabled(int(Cylinder), enabled); - monitorItemSetEnabled(int(Sphere), enabled); - } else { // Compositing disabled - monitorItemSetEnabled(int(PresentWindowsCurrent), false); - monitorItemSetEnabled(int(PresentWindowsAll), false); - monitorItemSetEnabled(int(DesktopGrid), false); - monitorItemSetEnabled(int(Cube), false); - monitorItemSetEnabled(int(Cylinder), false); - monitorItemSetEnabled(int(Sphere), false); - } + // Desktop Cube + enabled = effectEnabled(BuiltInEffect::Cube, config); + monitorItemSetEnabled(int(Cube), enabled); + monitorItemSetEnabled(int(Cylinder), enabled); + monitorItemSetEnabled(int(Sphere), enabled); // tabbox, depends on reasonable focus policy. KConfigGroup config2(m_config, "Windows"); QString focusPolicy = config2.readEntry("FocusPolicy", QString());