Fix offset when dragging too fast
On Windows, when we start a drag, we switch to native dragging in mid-flight, so that AeroSnap still works Fixes #121
This commit is contained in:
@@ -261,6 +261,11 @@ void StateDragging::onEntry()
|
||||
q->m_windowBeingDragged = fw->makeWindow();
|
||||
|
||||
QWindow *window = fw->windowHandle();
|
||||
|
||||
// Position the window before the drag start, otherwise if you move mouse too fast there will be an offset
|
||||
window->setPosition(QCursor::pos() - q->m_offset);
|
||||
|
||||
// Start the native move
|
||||
window->startSystemMove();
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user