From 15546e11c27dfddc367d39342bd6cbe952fa0536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 9 Apr 2013 08:11:58 +0200 Subject: [PATCH] Rename DecorationPlugin::noDecoration property to disabled --- client.cpp | 4 ++-- decorations.cpp | 30 +++++++++++++++--------------- decorations.h | 6 +++--- workspace.cpp | 8 ++++---- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/client.cpp b/client.cpp index ac806847d9..810ba9fec3 100644 --- a/client.cpp +++ b/client.cpp @@ -443,7 +443,7 @@ void Client::updateDecoration(bool check_workspace_pos, bool force) destroyDecoration(); if (!noBorder()) { setMask(QRegion()); // Reset shape mask - if (decorationPlugin()->hasNoDecoration()) { + if (decorationPlugin()->isDisabled()) { decoration = NULL; } else { decoration = decorationPlugin()->createDecoration(bridge); @@ -674,7 +674,7 @@ void Client::resizeDecoration(const QSize& s) bool Client::noBorder() const { - return decorationPlugin()->hasNoDecoration() || noborder || isFullScreen(); + return decorationPlugin()->isDisabled() || noborder || isFullScreen(); } bool Client::userCanSetNoBorder() const diff --git a/decorations.cpp b/decorations.cpp index 49bf8c284b..f2254147cb 100644 --- a/decorations.cpp +++ b/decorations.cpp @@ -35,7 +35,7 @@ KWIN_SINGLETON_FACTORY(DecorationPlugin) DecorationPlugin::DecorationPlugin(QObject *) : KDecorationPlugins(KGlobal::config()) - , m_noDecoration(false) + , m_disabled(false) { defaultPlugin = "kwin3_oxygen"; #ifndef KWIN_BUILD_OXYGEN @@ -44,7 +44,7 @@ DecorationPlugin::DecorationPlugin(QObject *) #ifdef KWIN_BUILD_DECORATIONS loadPlugin(""); // load the plugin specified in cfg file #else - setNoDecoration(true); + setDisabled(true); #endif } @@ -57,7 +57,7 @@ void DecorationPlugin::error(const QString &error_msg) { qWarning("%s", QString(i18n("KWin: ") + error_msg).toLocal8Bit().data()); - setNoDecoration(true); + setDisabled(true); } bool DecorationPlugin::provides(Requirement) @@ -65,19 +65,19 @@ bool DecorationPlugin::provides(Requirement) return false; } -void DecorationPlugin::setNoDecoration(bool noDecoration) +void DecorationPlugin::setDisabled(bool disabled) { - m_noDecoration = noDecoration; + m_disabled = disabled; } -bool DecorationPlugin::hasNoDecoration() const +bool DecorationPlugin::isDisabled() const { - return m_noDecoration; + return m_disabled; } bool DecorationPlugin::hasShadows() const { - if (hasNoDecoration()) { + if (m_disabled) { return false; } return factory()->supports(AbilityProvidesShadow); @@ -85,7 +85,7 @@ bool DecorationPlugin::hasShadows() const bool DecorationPlugin::hasAlpha() const { - if (hasNoDecoration()) { + if (m_disabled) { return false; } return factory()->supports(AbilityUsesAlphaChannel); @@ -93,7 +93,7 @@ bool DecorationPlugin::hasAlpha() const bool DecorationPlugin::supportsAnnounceAlpha() const { - if (hasNoDecoration()) { + if (m_disabled) { return false; } return factory()->supports(AbilityAnnounceAlphaChannel); @@ -101,7 +101,7 @@ bool DecorationPlugin::supportsAnnounceAlpha() const bool DecorationPlugin::supportsTabbing() const { - if (hasNoDecoration()) { + if (m_disabled) { return false; } return factory()->supports(AbilityTabbing); @@ -109,7 +109,7 @@ bool DecorationPlugin::supportsTabbing() const bool DecorationPlugin::supportsFrameOverlap() const { - if (hasNoDecoration()) { + if (m_disabled) { return false; } return factory()->supports(AbilityExtendIntoClientArea); @@ -117,7 +117,7 @@ bool DecorationPlugin::supportsFrameOverlap() const bool DecorationPlugin::supportsBlurBehind() const { - if (hasNoDecoration()) { + if (m_disabled) { return false; } return factory()->supports(AbilityUsesBlurBehind); @@ -125,7 +125,7 @@ bool DecorationPlugin::supportsBlurBehind() const Qt::Corner DecorationPlugin::closeButtonCorner() { - if (hasNoDecoration()) { + if (m_disabled) { return Qt::TopRightCorner; } return factory()->closeButtonCorner(); @@ -134,7 +134,7 @@ Qt::Corner DecorationPlugin::closeButtonCorner() QList< int > DecorationPlugin::supportedColors() const { QList ret; - if (hasNoDecoration()) { + if (m_disabled) { return ret; } for (Ability ab = ABILITYCOLOR_FIRST; diff --git a/decorations.h b/decorations.h index 31180b3be6..aeaa8f1104 100644 --- a/decorations.h +++ b/decorations.h @@ -37,7 +37,7 @@ public: /** * @returns @c true if there is no decoration plugin. **/ - bool hasNoDecoration() const; + bool isDisabled() const; bool hasShadows() const; bool hasAlpha() const; @@ -56,8 +56,8 @@ public: protected: virtual void error(const QString& error_msg); private: - void setNoDecoration(bool noDecoration); - bool m_noDecoration; + void setDisabled(bool noDecoration); + bool m_disabled; KWIN_SINGLETON(DecorationPlugin) }; diff --git a/workspace.cpp b/workspace.cpp index 2d7d55e06b..96d76500af 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -357,7 +357,7 @@ void Workspace::init() }; DecorationPlugin *deco = DecorationPlugin::self(); - if (!deco->hasNoDecoration() && deco->factory()->supports(AbilityExtendIntoClientArea)) + if (!deco->isDisabled() && deco->factory()->supports(AbilityExtendIntoClientArea)) protocols[ NETRootInfo::PROTOCOLS2 ] |= NET::WM2FrameOverlap; rootInfo = new RootInfo(this, display(), supportWindow->winId(), "KWin", protocols, 5, screen_number); @@ -917,7 +917,7 @@ void Workspace::slotReconfigure() updateToolWindows(true); DecorationPlugin *deco = DecorationPlugin::self(); - if (!deco->hasNoDecoration() && deco->reset(changed)) { + if (!deco->isDisabled() && deco->reset(changed)) { // Decorations need to be recreated // This actually seems to make things worse now @@ -961,7 +961,7 @@ void Workspace::slotReconfigure() } } - if (!deco->hasNoDecoration()) { + if (!deco->isDisabled()) { rootInfo->setSupported(NET::WM2FrameOverlap, deco->factory()->supports(AbilityExtendIntoClientArea)); } else { rootInfo->setSupported(NET::WM2FrameOverlap, false); @@ -1815,7 +1815,7 @@ void Workspace::slotCompositingToggled() { // notify decorations that composition state has changed DecorationPlugin *deco = DecorationPlugin::self(); - if (!deco->hasNoDecoration()) { + if (!deco->isDisabled()) { deco->factory()->reset(SettingCompositing); } }