mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 06:58:15 +00:00
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:
parent
cf21f78d8d
commit
103a8087cc
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user