Skip to content
Commit c9cfd840 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

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
parent 42a3bae3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment