From 3a4bba75429f3956e87551ad1c42c6f936cce5ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 17 Jun 2014 20:26:37 +0200 Subject: [PATCH] [aurorae] Fix the position passed in the QMouseEvent for processMousePressEvent The position passed to core didn't take care of padding and that position passed to decorationPos caused completely broken resize/moving behavior. E.g. resize was started where it should have been moving, or jumping of position when starting moving. REVIEW: 118803 --- clients/aurorae/src/aurorae.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp index df3adaf6c2..e1f4d2e711 100644 --- a/clients/aurorae/src/aurorae.cpp +++ b/clients/aurorae/src/aurorae.cpp @@ -486,7 +486,7 @@ void AuroraeClient::titlePressed(int button, int buttons) void AuroraeClient::titlePressed(Qt::MouseButton button, Qt::MouseButtons buttons) { const QPoint cursor = QCursor::pos(); - QMouseEvent *event = new QMouseEvent(QEvent::MouseButtonPress, m_view->mapFromGlobal(cursor), + QMouseEvent *event = new QMouseEvent(QEvent::MouseButtonPress, cursor - geometry().topLeft() + (m_padding ? QPoint(m_padding->left(), m_padding->top()) : QPoint(0, 0)), cursor, button, buttons, Qt::NoModifier); processMousePressEvent(event); delete event;