From 7f04a76b9afb2411578a55fd20f39d9e3c854e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 15 May 2014 08:34:04 +0200 Subject: [PATCH] [kcmscreenedges] Call reconfigureEffect on save Explicitly call reconfigureEffect on the Effects which can be enabled through the screenedges kcm. BUG: 334791 REVIEW: 118138 --- kcmkwin/kwinscreenedges/CMakeLists.txt | 2 ++ kcmkwin/kwinscreenedges/main.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/kcmkwin/kwinscreenedges/CMakeLists.txt b/kcmkwin/kwinscreenedges/CMakeLists.txt index ca90632e9c..9921b66b24 100644 --- a/kcmkwin/kwinscreenedges/CMakeLists.txt +++ b/kcmkwin/kwinscreenedges/CMakeLists.txt @@ -9,6 +9,8 @@ set( screenpreviewwidget.cpp ) ki18n_wrap_ui( kcm_kwinscreenedges_PART_SRCS main.ui ) +qt5_add_dbus_interface( kcm_kwinscreenedges_PART_SRCS + ${KWIN_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface) add_library( kcm_kwinscreenedges MODULE ${kcm_kwinscreenedges_PART_SRCS} ) target_link_libraries( kcm_kwinscreenedges ${X11_LIBRARIES} Qt5::DBus diff --git a/kcmkwin/kwinscreenedges/main.cpp b/kcmkwin/kwinscreenedges/main.cpp index 614cc0f5fd..54c8cd8153 100644 --- a/kcmkwin/kwinscreenedges/main.cpp +++ b/kcmkwin/kwinscreenedges/main.cpp @@ -21,6 +21,7 @@ along with this program. If not, see . #include "main.h" #include +#include #include #include @@ -123,6 +124,13 @@ void KWinScreenEdgesConfig::save() // Reload KWin. QDBusMessage message = QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); QDBusConnection::sessionBus().send(message); + // and reconfigure the effects + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(BuiltInEffects::nameForEffect(BuiltInEffect::PresentWindows)); + interface.reconfigureEffect(BuiltInEffects::nameForEffect(BuiltInEffect::DesktopGrid)); + interface.reconfigureEffect(BuiltInEffects::nameForEffect(BuiltInEffect::Cube)); emit changed(false); }