Avoid sending keys to gui manager when a popup frame is visible.

This commit is contained in:
David Capello 2011-03-01 22:37:00 -03:00
parent fd7e95035b
commit 2ac1d38d62

View File

@ -100,9 +100,13 @@ bool PopupFrame::onProcessMessage(JMessage msg)
break;
case JM_KEYPRESSED:
if (m_filtering && msg->key.scancode < KEY_MODIFIERS)
if (m_filtering &&
(msg->key.scancode == KEY_ESC ||
msg->key.scancode == KEY_ENTER ||
msg->key.scancode == KEY_ENTER_PAD)) {
closeWindow(NULL);
break;
}
return false;
case JM_BUTTONPRESSED:
/* if the user click outside the window, we have to close the