Fix hanging when switching focus between different editable comboboxes

This commit is contained in:
David Capello 2015-08-20 22:04:28 -03:00
parent 4112b295c8
commit d1799c037a

View File

@ -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);
}