romangg created this revision. romangg added reviewers: KWin, zzag, davidedmundson. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. romangg requested review of this revision.
REVISION SUMMARY In c9cfd840137b <https://phabricator.kde.org/R129:c9cfd840137b65bc7391f301f4f63da6df9de859> a position contains check was introduced in order to not count a bottom or right edge position as being part of the DecorationButton like QRectF::contains does. This was done by converting the geometry to a QRect and using its contains function, which does the comparision the desirable way for legacy reasons. But this means we lose precision, since the decoration library in theory supports floating values for positioning. To not do this instead of using QRect's functionality and implicitly dropping float precision therefore do the check for bottom and right edge explicitly. TEST PLAN Adapted autotest. REPOSITORY R129 Window Decoration Library BRANCH decorationContainsFix REVISION DETAIL https://phabricator.kde.org/D15907 AFFECTED FILES autotests/decorationbuttontest.cpp src/decorationbutton.cpp To: romangg, #kwin, zzag, davidedmundson Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart