Fix problem pressing some keyboard shortcuts in popup windows.

With this change we fix problems copying & pasting values in ColorSelector
text entries.
This commit is contained in:
David Capello 2012-03-21 23:14:11 -03:00
parent 0b19612860
commit d752d19742

View File

@ -98,11 +98,17 @@ bool PopupFrame::onProcessMessage(Message* msg)
break;
case JM_KEYPRESSED:
if (m_filtering &&
(msg->key.scancode == KEY_ESC ||
msg->key.scancode == KEY_ENTER ||
msg->key.scancode == KEY_ENTER_PAD)) {
closeWindow(NULL);
if (m_filtering) {
if (msg->key.scancode == KEY_ESC ||
msg->key.scancode == KEY_ENTER ||
msg->key.scancode == KEY_ENTER_PAD) {
closeWindow(NULL);
}
// If we are filtering messages we don't propagate key-events
// to other widgets. As we're a popup frame and we're
// filtering messages, the user shouldn't be able to start
// other actions pressing keyboard shortcuts.
return false;
}
break;