[Differential] [Request, 15 lines] D4713: Fix binding loop regression in FrameSVGItem
David Edmundson
noreply at phabricator.kde.org
Wed Feb 22 00:05:31 UTC 2017
davidedmundson created this revision.
Restricted Application added projects: Plasma, Frameworks.
Restricted Application added a subscriber: plasma-devel.
REVISION SUMMARY
https://phabricator.kde.org/R242:d8a1a9eb084b19e552c789244267f7346e1b27a8 introduces an unintended code
change, resizeFrame() updates the margins and in turns calls
repaintNeeded. This isn't needed and is a binding loop if we ever have a
frameSVGItem whose size depends on it's own margins.
resizeFrame is different from setEnabledBorders / setElementPrefix /
theme changes because even though we need to create a new FrameData we
know any hints and margins won't change. FrameSvgItem::updateSizes
doesn't depend on the size in any way.
The old code did pointlessly call updateSizes, but didn't emit anything.
This patch that introduces a flag to updateFrameData to determine if we
should re-evaluate size hints or not.
TEST PLAN
GDB showed where the loop was.
Read the old code, and looked for differences
Ran plasmashell, checked I had no binding loop, frames including button which have
composeOverBorder which need the new FrameData all rendered correctly.
REPOSITORY
R242 Plasma Framework (Library)
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D4713
AFFECTED FILES
src/plasma/framesvg.cpp
src/plasma/private/framesvg_p.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: davidedmundson, #plasma, #frameworks
Cc: plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170222/a910883e/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list