summaryrefslogtreecommitdiffstats
path: root/ui/base/win
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-17 23:12:59 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-17 23:12:59 +0000
commit5e98ead4739cb4168e6d8776e0f2c788743a321a (patch)
treeb562a1c757dc7dc26f2b0e5c3b3459f4129d7608 /ui/base/win
parent609b60bf1660e735b228e8e1e652c55069047248 (diff)
downloadchromium_src-5e98ead4739cb4168e6d8776e0f2c788743a321a.zip
chromium_src-5e98ead4739cb4168e6d8776e0f2c788743a321a.tar.gz
chromium_src-5e98ead4739cb4168e6d8776e0f2c788743a321a.tar.bz2
Ignore WM_MOUSEACTIVATE messages which occur in the context of touch events which result in bubbles like bookmarks,
avatar button, being displayed. When we touch the button which brings up the bubble, a WM_MOUSEACTIVATE message comes in much later for the main window. This results in the window being activated which in turn hides the bubble which occurs due to an activation change. Fix is to ignore WM_MOUSEACTIVATE messages in the context of touch downs if we have the flag which indicates that inactive rendering is to be faked. This does not cause activation issues when we touch/click elsewhere due to calls to SetFocus which occur in the context of these events from the focus controller code. The touch down context flag is reset to false in a delayed task. The other change is to ignore WM_MOUSEACTIVATE messages in the LegacyRenderWidgetHostHWND class if the kIgnoreTouchMouseActivateForWindow property is set on it. This property is set by the MenuController code to prevent activation loss when the menu options are selected via touch. This is mimicing similar code in HWNDMessageHandler. BUG=329854,326128 R=sky@chromium.org, sky Review URL: https://codereview.chromium.org/199593004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257522 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/win')
-rw-r--r--ui/base/win/internal_constants.cc13
-rw-r--r--ui/base/win/internal_constants.h20
2 files changed, 33 insertions, 0 deletions
diff --git a/ui/base/win/internal_constants.cc b/ui/base/win/internal_constants.cc
new file mode 100644
index 0000000..325ab90
--- /dev/null
+++ b/ui/base/win/internal_constants.cc
@@ -0,0 +1,13 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/base/win/internal_constants.h"
+
+namespace ui {
+
+const wchar_t kIgnoreTouchMouseActivateForWindow[] =
+ L"Chrome.IgnoreMouseActivate";
+
+} // namespace ui
+
diff --git a/ui/base/win/internal_constants.h b/ui/base/win/internal_constants.h
new file mode 100644
index 0000000..d81c34d
--- /dev/null
+++ b/ui/base/win/internal_constants.h
@@ -0,0 +1,20 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_WIN_INTERNAL_CONSTANTS_H_
+#define UI_BASE_WIN_INTERNAL_CONSTANTS_H_
+
+#include "ui/base/ui_base_export.h"
+
+namespace ui {
+
+// This window property if set on the window does not activate the window for a
+// touch based WM_MOUSEACTIVATE message.
+UI_BASE_EXPORT extern const wchar_t kIgnoreTouchMouseActivateForWindow[];
+
+} // namespace ui
+
+#endif // UI_BASE_WIN_INTERNAL_CONSTANTS_H_
+
+