Check against QRect whether pointer is inside DecorationButton

Authored by zzag on Sep 2 2018, 9:05 PM.

Description

Check against QRect whether pointer is inside DecorationButton

Summary:
If several buttons share an edge, i.e. spacing between decoration
buttons is set to 0, and the pointer is on that edge, both buttons will
be hovered.

This happens because QRectF::contains returns true for points that are
on "outer" edges, e.g.

QRectF rect(0, 0, 10, 10);
rect.contains(QPointF(10, 5)); // returns true

Test Plan: Ran tests.

Reviewers: KWin, davidedmundson

Reviewed By: KWin, davidedmundson

Subscribers: davidedmundson, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D15226

Details

Committed
zzagSep 3 2018, 11:52 AM
Reviewer
KWin
Differential Revision
D15226: Check against QRect whether pointer is inside DecorationButton
Parents
R129:42a3bae3eb6a: Update version number for 5.13.80 GIT_SILENT
Branches
Unknown
Tags
Unknown