summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Gräßlin <mgraesslin@kde.org>2011-10-14 18:41:33 (GMT)
committerMartin Gräßlin <mgraesslin@kde.org>2011-10-14 18:41:33 (GMT)
commitd4b83c3b37d3671ce0707adce26a4c1483a5b406 (patch)
tree89a39a45300b3d29af53e112abd71b1e958a49a7
parent3d8ce220025682868aa0e795aec0267701b52663 (diff)
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
-rw-r--r--kwin/clients/aurorae/src/lib/auroraebutton.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/kwin/clients/aurorae/src/lib/auroraebutton.cpp b/kwin/clients/aurorae/src/lib/auroraebutton.cpp
index 1c66305..1f54a90 100644
--- a/kwin/clients/aurorae/src/lib/auroraebutton.cpp
+++ b/kwin/clients/aurorae/src/lib/auroraebutton.cpp
@@ -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);