From 38ba5bd7a0c7770e95aea6619174a953e5d92796 Mon Sep 17 00:00:00 2001 From: "mma.public@gmail.com" Date: Tue, 3 May 2011 22:12:35 +0000 Subject: Modifies the event handler for WM_APPCOMMAND events to return TRUE if the event was handled. Previously it returned 0 causing the event to bubble up to the DefWndProc, which would synthesize keypresses appropriate for the event and cause it to effectively be handled twice. This should fix double handling of events for people with devices that generate WM_APPCOMMAND messages (tablets, Logitech mice, etc...) BUG=19672 TEST=See various cases reported on bug Review URL: http://codereview.chromium.org/6901076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83975 0039d316-1c4b-4281-b951-d872f2087c98 --- views/window/window_win.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'views') diff --git a/views/window/window_win.cc b/views/window/window_win.cc index e1817e4..d421647 100644 --- a/views/window/window_win.cc +++ b/views/window/window_win.cc @@ -366,9 +366,8 @@ LRESULT WindowWin::OnAppCommand(HWND window, short app_command, WORD device, int keystate) { // We treat APPCOMMAND ids as an extension of our command namespace, and just // let the delegate figure out what to do... - if (!GetWindow()->window_delegate()->ExecuteWindowsCommand(app_command)) - return WidgetWin::OnAppCommand(window, app_command, device, keystate); - return 0; + return GetWindow()->window_delegate()->ExecuteWindowsCommand(app_command) || + WidgetWin::OnAppCommand(window, app_command, device, keystate); } void WindowWin::OnClose() { -- cgit v1.1