From e3ab2c592480718052bf055d3418e36c7f45695f Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 13 Jan 2011 19:49:27 +0000 Subject: [PATCH] * test the prefix equiv at the right place * prevent unecessary calls on setCustomGeometry by comparing the new and existing geom svn path=/trunk/KDE/kdelibs/; revision=1214252 --- private/focusindicator.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/private/focusindicator.cpp b/private/focusindicator.cpp index 1060465fb..55a0bc0e0 100644 --- a/private/focusindicator.cpp +++ b/private/focusindicator.cpp @@ -85,6 +85,10 @@ FocusIndicator::~FocusIndicator() void FocusIndicator::setCustomGeometry(const QRectF &geometry) { + if (m_customGeometry == geometry) { + return; + } + m_customGeometry = geometry; syncGeometry(); } @@ -102,14 +106,15 @@ void FocusIndicator::setCustomPrefix(const QString &prefix) m_prefix.prepend(m_customPrefix); } - if (m_prefix == was) { - return; - } - m_testPrefix = m_customPrefix % "hover"; if (m_prefix.isEmpty()) { m_prefix = m_customPrefix % "shadow"; } + + if (m_prefix == was) { + return; + } + syncGeometry(); resizeEvent(0); }