From 765455a0b1a1cf4288b99cd21964a44715d5584f Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 4 Apr 2017 12:39:01 -0400 Subject: [PATCH] cefclient: Linux: Fix order and timing of OSR key events (issue #2139) --- tests/cefclient/browser/browser_window_osr_gtk.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/cefclient/browser/browser_window_osr_gtk.cc b/tests/cefclient/browser/browser_window_osr_gtk.cc index 5508c8bc8..67775ecf7 100644 --- a/tests/cefclient/browser/browser_window_osr_gtk.cc +++ b/tests/cefclient/browser/browser_window_osr_gtk.cc @@ -1382,12 +1382,11 @@ gint BrowserWindowOsrGtk::KeyEvent(GtkWidget* widget, if (event->type == GDK_KEY_PRESS) { key_event.type = KEYEVENT_RAWKEYDOWN; 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; host->SendKeyEvent(key_event); + } else { + key_event.type = KEYEVENT_KEYUP; + host->SendKeyEvent(key_event); } return TRUE;