Skip to content
  • Vlad Zahorodnii's avatar
    Check against QRect whether pointer is inside DecorationButton · c9cfd840
    Vlad Zahorodnii authored
    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
    c9cfd840