cefclient: Linux: Fix order and timing of OSR key events (issue #2139)

This commit is contained in:
Marshall Greenblatt 2017-04-04 12:39:01 -04:00
parent aacc3aae9a
commit b66cddb919
1 changed files with 3 additions and 4 deletions

View File

@ -1382,12 +1382,11 @@ gint BrowserWindowOsrGtk::KeyEvent(GtkWidget* widget,
if (event->type == GDK_KEY_PRESS) { if (event->type == GDK_KEY_PRESS) {
key_event.type = KEYEVENT_RAWKEYDOWN; key_event.type = KEYEVENT_RAWKEYDOWN;
host->SendKeyEvent(key_event); host->SendKeyEvent(key_event);
} else {
// Need to send both KEYUP and CHAR events.
key_event.type = KEYEVENT_KEYUP;
host->SendKeyEvent(key_event);
key_event.type = KEYEVENT_CHAR; key_event.type = KEYEVENT_CHAR;
host->SendKeyEvent(key_event); host->SendKeyEvent(key_event);
} else {
key_event.type = KEYEVENT_KEYUP;
host->SendKeyEvent(key_event);
} }
return TRUE; return TRUE;