[kcmkwin/tabbox] Reconfigure Effects after saving configuration

After saving the configuration the settings for CoverSwitch or FlipSwitch
might have changed. Thus call a reconfigure on them.
remotes/origin/Plasma/5.0
Martin Gräßlin 12 years ago
parent 165bab24f2
commit 0eaf41df85
  1. 2
      kcmkwin/kwintabbox/CMakeLists.txt
  2. 7
      kcmkwin/kwintabbox/main.cpp

@ -13,6 +13,8 @@ set(kcm_kwintabbox_PART_SRCS
)
ki18n_wrap_ui( kcm_kwintabbox_PART_SRCS main.ui )
qt5_add_dbus_interface( kcm_kwintabbox_PART_SRCS
${KWIN_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface)
add_library(kcm_kwintabbox MODULE ${kcm_kwintabbox_PART_SRCS})

@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "main.h"
#include <effect_builtins.h>
#include <kwin_effects_interface.h>
// Qt
#include <QtDBus/QtDBus>
@ -331,6 +332,12 @@ void KWinTabBoxConfig::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::CoverSwitch));
interface.reconfigureEffect(BuiltInEffects::nameForEffect(BuiltInEffect::FlipSwitch));
emit changed(false);
}

Loading…
Cancel
Save