mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
Fix crash clicking the bottom of the combobox
Bug report: https://community.aseprite.org/t/9254
This commit is contained in:
parent
3881589301
commit
f5b452ae94
@ -384,11 +384,17 @@ bool ComboBox::onProcessMessage(Message* msg)
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
MouseMessage* mouseMsg = static_cast<MouseMessage*>(msg);
|
||||
|
||||
// Use the nativeWindow() from the mouseMsg before we close
|
||||
// the listbox because the mouseMsg->display() could be from
|
||||
// the same popup.
|
||||
const gfx::Point screenPos =
|
||||
mouseMsg->display()->nativeWindow()->pointToScreen(mouseMsg->position());
|
||||
|
||||
closeListBox();
|
||||
|
||||
MouseMessage* mouseMsg = static_cast<MouseMessage*>(msg);
|
||||
Widget* pick = manager()->pickFromScreenPos(
|
||||
mouseMsg->display()->nativeWindow()->pointToScreen(mouseMsg->position()));
|
||||
Widget* pick = manager()->pickFromScreenPos(screenPos);
|
||||
if (pick && pick->hasAncestor(this))
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user