From 36925491700150ef9ccb765f58c7cc12c3e120ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 13 Oct 2013 15:52:01 +0200 Subject: [PATCH] fix deco config updates - B2 linked to the wrong slot (instead of changed signal) - border size change was not written (for B2, Laptop etc) - Aurorae didn't recreate decos when required BUG: 325946 FIXED-IN: 4.11.3 REVIEW: 113229 --- clients/aurorae/src/aurorae.cpp | 4 ++-- clients/b2/config/config.cpp | 12 ++++-------- kcmkwin/kwindecoration/configdialog.cpp | 3 +++ kcmkwin/kwindecoration/configdialog.h | 2 ++ kcmkwin/kwindecoration/kwindecoration.cpp | 4 +--- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp index 75ca5ead8d..a9487c344c 100644 --- a/clients/aurorae/src/aurorae.cpp +++ b/clients/aurorae/src/aurorae.cpp @@ -161,7 +161,7 @@ bool AuroraeFactory::reset(unsigned long changed) if (changed & SettingFont){ emit titleFontChanged(); } - if (changed & SettingCompositing) { + if (changed == SettingCompositing) { return false; } const KConfig conf("auroraerc"); @@ -180,7 +180,7 @@ bool AuroraeFactory::reset(unsigned long changed) m_theme->setButtonSize((KDecorationDefines::BorderSize)themeGroup.readEntry("ButtonSize", KDecorationDefines::BorderNormal)); } emit configChanged(); - return false; // need hard reset + return changed & (SettingDecoration | SettingButtons | SettingBorder); // need hard reset } bool AuroraeFactory::supports(Ability ability) const diff --git a/clients/b2/config/config.cpp b/clients/b2/config/config.cpp index 7739223607..08b7860c2d 100644 --- a/clients/b2/config/config.cpp +++ b/clients/b2/config/config.cpp @@ -106,14 +106,10 @@ B2Config::B2Config(KConfig *conf, QWidget *parent) load(cg); // Ensure we track user changes properly - connect(cbColorBorder, SIGNAL(clicked()), - this, SLOT(slotSelectionChanged())); - connect(showGrabHandleCb, SIGNAL(clicked()), - this, SLOT(slotSelectionChanged())); - connect(autoMoveTitlebarCb, SIGNAL(clicked()), - this, SLOT(slotSelectionChanged())); - connect(menuDblClickOp, SIGNAL(activated(int)), - this, SLOT(slotSelectionChanged())); + connect(cbColorBorder, SIGNAL(clicked()), SIGNAL(changed())); + connect(showGrabHandleCb, SIGNAL(clicked()), SIGNAL(changed())); + connect(autoMoveTitlebarCb, SIGNAL(clicked()), SIGNAL(changed())); + connect(menuDblClickOp, SIGNAL(activated(int)), SIGNAL(changed())); // Make the widgets visible in kwindecoration gb->show(); } diff --git a/kcmkwin/kwindecoration/configdialog.cpp b/kcmkwin/kwindecoration/configdialog.cpp index 881e77e9e2..f9a82aded6 100644 --- a/kcmkwin/kwindecoration/configdialog.cpp +++ b/kcmkwin/kwindecoration/configdialog.cpp @@ -44,6 +44,9 @@ KWinAuroraeConfigForm::KWinAuroraeConfigForm(QWidget* parent) : QWidget(parent) { setupUi(this); + connect(borderSizesCombo, SIGNAL(currentIndexChanged(int)), SIGNAL(changed())); + connect(buttonSizesCombo, SIGNAL(currentIndexChanged(int)), SIGNAL(changed())); + connect(closeWindowsDoubleClick, SIGNAL(clicked()), SIGNAL(changed())); } void KWinAuroraeConfigForm::enableNoSideBorderSupport(bool enable) diff --git a/kcmkwin/kwindecoration/configdialog.h b/kcmkwin/kwindecoration/configdialog.h index 7687925ac1..0f031517bb 100644 --- a/kcmkwin/kwindecoration/configdialog.h +++ b/kcmkwin/kwindecoration/configdialog.h @@ -35,6 +35,8 @@ class KWinAuroraeConfigForm : public QWidget, public Ui::KWinAuroraeConfigForm public: explicit KWinAuroraeConfigForm(QWidget* parent); void enableNoSideBorderSupport(bool enable); +Q_SIGNALS: + void changed(); }; class KWinDecorationConfigForm : public QWidget, public Ui::KWinDecorationConfigForm diff --git a/kcmkwin/kwindecoration/kwindecoration.cpp b/kcmkwin/kwindecoration/kwindecoration.cpp index 9b1697d5ec..364a410aef 100644 --- a/kcmkwin/kwindecoration/kwindecoration.cpp +++ b/kcmkwin/kwindecoration/kwindecoration.cpp @@ -444,9 +444,7 @@ void KWinDecorationModule::slotConfigureDecoration() delete configDialog; } if (reload) { - // Send signal to all kwin instances - QDBusMessage message = QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); - QDBusConnection::sessionBus().send(message); + save(); } }