summaryrefslogtreecommitdiffstats
path: root/views/widget/widget_win.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-08 16:28:44 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-08 16:28:44 +0000
commit0e0e6d757d44f0b0a3678a714c0c09186e3aa6eb (patch)
treea2bcf52eaa02b828865954b6fb800fccee08463b /views/widget/widget_win.cc
parentb57c599f4d27dbd93db10033d599fbb512611788 (diff)
downloadchromium_src-0e0e6d757d44f0b0a3678a714c0c09186e3aa6eb.zip
chromium_src-0e0e6d757d44f0b0a3678a714c0c09186e3aa6eb.tar.gz
chromium_src-0e0e6d757d44f0b0a3678a714c0c09186e3aa6eb.tar.bz2
Enabling the default button behavior on Linux toolkit_views.
I had to make the KeyEvent constructor include the event flags. Also cleaned-up some unit-tests BUG=None TEST=Run the unit-tests. Review URL: http://codereview.chromium.org/266012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28397 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/widget_win.cc')
-rw-r--r--views/widget/widget_win.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index 6f30622..16f4860 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -571,8 +571,8 @@ void WidgetWin::OnInitMenuPopup(HMENU menu,
}
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, win_util::WinToKeyboardCode(c),
+ KeyEvent::GetKeyStateFlags(), rep_cnt, flags);
RootView* root_view = GetFocusedViewRootView();
if (!root_view)
root_view = root_view_.get();
@@ -581,8 +581,8 @@ void WidgetWin::OnKeyDown(TCHAR c, UINT rep_cnt, UINT flags) {
}
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, win_util::WinToKeyboardCode(c),
+ KeyEvent::GetKeyStateFlags(), rep_cnt, flags);
RootView* root_view = GetFocusedViewRootView();
if (!root_view)
root_view = root_view_.get();