summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-28 21:32:30 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-28 21:32:30 +0000
commita4d271ecbea5ed763d49919fac7bfabe788832f6 (patch)
treec646a4d085142007968138c7ad26d1fb2aafe6a9 /views/widget
parent19ff283d0e043c59206fdc2e890a2780933849fe (diff)
downloadchromium_src-a4d271ecbea5ed763d49919fac7bfabe788832f6.zip
chromium_src-a4d271ecbea5ed763d49919fac7bfabe788832f6.tar.gz
chromium_src-a4d271ecbea5ed763d49919fac7bfabe788832f6.tar.bz2
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
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/root_view.cc4
-rw-r--r--views/widget/widget_win.cc6
2 files changed, 4 insertions, 6 deletions
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));
}