diff --git a/clients/aurorae/src/lib/auroraebutton.cpp b/clients/aurorae/src/lib/auroraebutton.cpp index 1c66305e8a..1f54a90f20 100644 --- a/clients/aurorae/src/lib/auroraebutton.cpp +++ b/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);