mirror of
https://github.com/aseprite/aseprite.git
synced 2024-11-20 14:21:45 +00:00
Fix hanging when switching focus between different editable comboboxes
This commit is contained in:
parent
4112b295c8
commit
d1799c037a
@ -1119,6 +1119,31 @@ GraphicsPtr Widget::getGraphics(const gfx::Rect& clip)
|
||||
bool Widget::sendMessage(Message* msg)
|
||||
{
|
||||
ASSERT(msg != NULL);
|
||||
|
||||
// Filter out-of-sync messages
|
||||
switch (msg->type()) {
|
||||
|
||||
case kFocusEnterMessage:
|
||||
if (!hasFocus())
|
||||
return false;
|
||||
break;
|
||||
|
||||
case kFocusLeaveMessage:
|
||||
if (hasFocus())
|
||||
return false;
|
||||
break;
|
||||
|
||||
case kMouseEnterMessage:
|
||||
if (!hasMouse())
|
||||
return false;
|
||||
break;
|
||||
|
||||
case kMouseLeaveMessage:
|
||||
if (hasMouse())
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
return onProcessMessage(msg);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user