diff --git a/kcmkwin/kwinoptions/CMakeLists.txt b/kcmkwin/kwinoptions/CMakeLists.txt index 3a59e39245..478cb47412 100644 --- a/kcmkwin/kwinoptions/CMakeLists.txt +++ b/kcmkwin/kwinoptions/CMakeLists.txt @@ -3,7 +3,7 @@ set(kcm_kwinoptions_PART_SRCS windows.cpp mouse.cpp main.cpp ) qt5_wrap_ui(kcm_kwinoptions_PART_SRCS actions.ui advanced.ui focus.ui mouse.ui moving.ui) add_library(kcm_kwinoptions MODULE ${kcm_kwinoptions_PART_SRCS}) -target_link_libraries(kcm_kwinoptions Qt5::DBus KF5::Completion KF5::I18n KF5::KCMUtils KF5::KDE4Support) +target_link_libraries(kcm_kwinoptions Qt5::DBus KF5::Completion KF5::I18n KF5::KCMUtils) install(TARGETS kcm_kwinoptions DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/kcmkwin/kwinoptions/main.cpp b/kcmkwin/kwinoptions/main.cpp index eee31f9178..61aaa78565 100644 --- a/kcmkwin/kwinoptions/main.cpp +++ b/kcmkwin/kwinoptions/main.cpp @@ -25,11 +25,9 @@ #include -#include #include #include #include -#include #include #include diff --git a/kcmkwin/kwinoptions/mouse.cpp b/kcmkwin/kwinoptions/mouse.cpp index 012404a506..80211ceecc 100644 --- a/kcmkwin/kwinoptions/mouse.cpp +++ b/kcmkwin/kwinoptions/mouse.cpp @@ -33,9 +33,8 @@ #include #include -#include +#include #include -#include #include #include #include @@ -181,7 +180,6 @@ KTitleBarActionsConfig::KTitleBarActionsConfig(bool _standAlone, KConfig *_confi connect(m_ui->leftClickMaximizeButton, SIGNAL(activated(int)), SLOT(changed())); connect(m_ui->middleClickMaximizeButton, SIGNAL(activated(int)), SLOT(changed())); connect(m_ui->rightClickMaximizeButton, SIGNAL(activated(int)), SLOT(changed())); - connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), SLOT(paletteChanged())); load(); } @@ -381,6 +379,15 @@ void KTitleBarActionsConfig::showEvent(QShowEvent *ev) KCModule::showEvent(ev); } +void KTitleBarActionsConfig::changeEvent(QEvent *ev) +{ + if (ev->type() == QEvent::PaletteChange) { + paletteChanged(); + } + ev->accept(); +} + + void KTitleBarActionsConfig::load() { KConfigGroup windowsConfig(config, "Windows"); diff --git a/kcmkwin/kwinoptions/mouse.h b/kcmkwin/kwinoptions/mouse.h index b81c9c941e..9e137d88a5 100644 --- a/kcmkwin/kwinoptions/mouse.h +++ b/kcmkwin/kwinoptions/mouse.h @@ -62,6 +62,7 @@ public: protected: void showEvent(QShowEvent *ev); + void changeEvent(QEvent *ev); public Q_SLOTS: void changed() {