Fix mouse pos of the new message created in Widget::offerCapture()

This commit is contained in:
David Capello 2021-03-31 17:14:31 -03:00
parent 4f4f5fee7f
commit 27273e5529

View File

@ -1393,7 +1393,10 @@ bool Widget::offerCapture(ui::MouseMessage* mouseMsg, int widget_type)
mouseMsg->pointerType(),
mouseMsg->button(),
mouseMsg->modifiers(),
mouseMsg->position());
(mouseMsg->display() == pick->display() ?
mouseMsg->position():
pick->display()->nativeWindow()->pointFromScreen(screenPos)));
mouseMsg2->setDisplay(pick->display());
mouseMsg2->setRecipient(pick);
man->enqueueMessage(mouseMsg2);
return true;