From a4d271ecbea5ed763d49919fac7bfabe788832f6 Mon Sep 17 00:00:00 2001 From: "jcampan@chromium.org" Date: Mon, 28 Sep 2009 21:32:30 +0000 Subject: Reverting 27412 it breaks the toolkit views Linux build. TBR=sky Review URL: http://codereview.chromium.org/254005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27416 0039d316-1c4b-4281-b951-d872f2087c98 --- views/widget/root_view.cc | 4 ++-- views/widget/widget_win.cc | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'views/widget') diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc index 09c1909..8baca07 100644 --- a/views/widget/root_view.cc +++ b/views/widget/root_view.cc @@ -782,8 +782,8 @@ bool RootView::ProcessKeyEvent(const KeyEvent& event) { View* v = GetFocusedView(); // Special case to handle right-click context menus triggered by the // keyboard. - if (v && v->IsEnabled() && ((event.GetKeyCode() == base::VKEY_APPS) || - (event.GetKeyCode() == base::VKEY_F10 && event.IsShiftDown()))) { + if (v && v->IsEnabled() && ((event.GetCharacter() == base::VKEY_APPS) || + (event.GetCharacter() == base::VKEY_F10 && event.IsShiftDown()))) { gfx::Point screen_loc = v->GetKeyboardContextMenuLocation(); v->ShowContextMenu(screen_loc.x(), screen_loc.y(), false); return true; diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc index 02f6115..13df3ad 100644 --- a/views/widget/widget_win.cc +++ b/views/widget/widget_win.cc @@ -496,14 +496,12 @@ LRESULT WidgetWin::OnGetObject(UINT uMsg, WPARAM w_param, LPARAM l_param) { } void WidgetWin::OnKeyDown(TCHAR c, UINT rep_cnt, UINT flags) { - KeyEvent event(Event::ET_KEY_PRESSED, - win_util::WinToKeyboardCode(c), rep_cnt, flags); + KeyEvent event(Event::ET_KEY_PRESSED, c, rep_cnt, flags); SetMsgHandled(root_view_->ProcessKeyEvent(event)); } void WidgetWin::OnKeyUp(TCHAR c, UINT rep_cnt, UINT flags) { - KeyEvent event(Event::ET_KEY_RELEASED, - win_util::WinToKeyboardCode(c), rep_cnt, flags); + KeyEvent event(Event::ET_KEY_RELEASED, c, rep_cnt, flags); SetMsgHandled(root_view_->ProcessKeyEvent(event)); } -- cgit v1.1