From 103a8087ccc8843cbe1128f4a1e0716b83fe80da Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 22 Mar 2021 11:54:57 -0300 Subject: [PATCH] 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. --- src/ui/widget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/widget.cpp b/src/ui/widget.cpp index 2c5e56712..5db07abfd 100644 --- a/src/ui/widget.cpp +++ b/src/ui/widget.cpp @@ -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();