Don't react on mouse release events in Aurorae if mouse is outside button

HAPPY BIRTHDAY KDE. One bug fix as a present.

BUG: 283236
FIXED-IN: 4.7.3
This commit is contained in:
Martin Gräßlin 2011-10-14 20:41:33 +02:00
parent e9ef4b8600
commit eda72d6475

View file

@ -185,8 +185,7 @@ void AuroraeButton::mousePressEvent(QGraphicsSceneMouseEvent* event)
void AuroraeButton::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
{
Q_UNUSED(event)
if (m_pressed) {
if (m_pressed && contains(event->pos())) {
emit clicked();
}
m_pressed = false;
@ -391,7 +390,7 @@ void AuroraeMaximizeButton::mousePressEvent(QGraphicsSceneMouseEvent* event)
void AuroraeMaximizeButton::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
{
if (isPressed() && m_pressedButton == event->button()) {
if (isPressed() && m_pressedButton == event->button() && contains(event->pos())) {
emit clicked(m_pressedButton);
}
setPressed(false);