diff options
author | rjkroege@google.com <rjkroege@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 18:43:18 +0000 |
---|---|---|
committer | rjkroege@google.com <rjkroege@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 18:43:18 +0000 |
commit | b2f7ac4583b968d0c20ea8f6c4110aeb6882699a (patch) | |
tree | 7bcf1278af056ab056221da0ee01e81851e9ebde /views/controls/menu/native_menu_gtk.cc | |
parent | bd2b41afb25b648e3f77dce87064971f63894a7f (diff) | |
download | chromium_src-b2f7ac4583b968d0c20ea8f6c4110aeb6882699a.zip chromium_src-b2f7ac4583b968d0c20ea8f6c4110aeb6882699a.tar.gz chromium_src-b2f7ac4583b968d0c20ea8f6c4110aeb6882699a.tar.bz2 |
touchui: Directly process key and mouse events.
Capture the keyboard and mouse events directly from X, create a corresponding
views::Event out of it, and send it to the associated RootView.
Includes Chad's (wyck) function FindRootViewForGdkEvent (from #3704005) slightly
modified (called FindRootViewForGdkWindow).
BUG=None
TEST=Click/Keypress events in a webpage should work correctly.
Review URL: http://codereview.chromium.org/3801011
Patch from Sadrul Chowdhury <sadrul@chromium.org>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63916 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/menu/native_menu_gtk.cc')
-rw-r--r-- | views/controls/menu/native_menu_gtk.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/views/controls/menu/native_menu_gtk.cc b/views/controls/menu/native_menu_gtk.cc index 12f73da..45c64c0 100644 --- a/views/controls/menu/native_menu_gtk.cc +++ b/views/controls/menu/native_menu_gtk.cc @@ -23,6 +23,10 @@ #include "views/controls/menu/menu_2.h" #include "views/controls/menu/nested_dispatcher_gtk.h" +#if defined(TOUCH_UI) +#include "views/focus/accelerator_handler.h" +#endif + namespace { const char kPositionString[] = "position"; @@ -220,6 +224,12 @@ void NativeMenuGtk::SetMinimumWidth(int width) { gtk_widget_set_size_request(menu_, width, -1); } +#if defined(TOUCH_UI) +bool NativeMenuGtk::Dispatch(XEvent* xevent) { + return DispatchXEvent(xevent); +} +#endif + bool NativeMenuGtk::Dispatch(GdkEvent* event) { if (menu_hidden_) { // The menu has been closed but the message loop is still nested. Don't |