Fix bug selecting brush types and dynamics with one click + dragging mouse

Fixed bug offering mouse capture to widgets in other displays when
get_multiple_displays() is on.
This commit is contained in:
David Capello 2021-03-22 11:54:57 -03:00
parent cf21f78d8d
commit 103a8087cc

View File

@ -1374,8 +1374,9 @@ void Widget::releaseMouse()
bool Widget::offerCapture(ui::MouseMessage* mouseMsg, int widget_type)
{
if (hasCapture()) {
const gfx::Point screenPos = mouseMsg->display()->nativeWindow()->pointToScreen(mouseMsg->position());
auto man = manager();
Widget* pick = (man ? man->pick(mouseMsg->position()): nullptr);
Widget* pick = (man ? man->pickFromScreenPos(screenPos): nullptr);
if (pick && pick != this && pick->type() == widget_type) {
releaseMouse();