cefclient: Linux: Fix order and timing of OSR key events (issue #2139)
This commit is contained in:
parent
aacc3aae9a
commit
b66cddb919
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue