gtk: Handle accelerators after renderer handled them.

The key-press signal captured the key events before renderer handles,
which violated the behavior on OS X and Windows.

Fixes #221.
This commit is contained in:
Cheng Zhao 2014-04-05 19:21:18 +08:00
parent 3d518c2105
commit 5bbf749693
2 changed files with 18 additions and 12 deletions

View file

@ -71,6 +71,11 @@ class NativeWindowGtk : public NativeWindow,
virtual void UpdateDraggableRegions(
const std::vector<DraggableRegion>& regions) OVERRIDE;
// Overridden from content::WebContentsDelegate:
virtual void HandleKeyboardEvent(
content::WebContents*,
const content::NativeWebKeyboardEvent&) OVERRIDE;
// Overridden from ActiveWindowWatcherXObserver.
virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE;
@ -101,9 +106,6 @@ class NativeWindowGtk : public NativeWindow,
CHROMEGTK_CALLBACK_1(NativeWindowGtk, gboolean, OnButtonPress,
GdkEventButton*);
// Key press event callback.
CHROMEGTK_CALLBACK_1(NativeWindowGtk, gboolean, OnKeyPress, GdkEventKey*);
GtkWindow* window_;
GtkWidget* vbox_;