Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(958)

Unified Diff: ui/views/win/hwnd_message_handler.cc

Issue 271863006: Fix gesture event handling in MenuButton (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git cl format Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/win/hwnd_message_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_message_handler.cc
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index ec3cacf4c35b1652148bf63cd890bef511a8f3f6..da2835efec279f7d4ea035806bc6d1ec1062054e 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -357,7 +357,7 @@ HWNDMessageHandler::HWNDMessageHandler(HWNDMessageHandlerDelegate* delegate)
id_generator_(0),
needs_scroll_styles_(false),
in_size_loop_(false),
- touch_down_context_(false),
+ touch_down_contexts_(0),
last_mouse_hwheel_time_(0),
msg_handled_(FALSE) {
}
@@ -1477,9 +1477,9 @@ void HWNDMessageHandler::OnKillFocus(HWND focused_window) {
LRESULT HWNDMessageHandler::OnMouseActivate(UINT message,
WPARAM w_param,
LPARAM l_param) {
- // Please refer to the comments in the header for the touch_down_context_
+ // Please refer to the comments in the header for the touch_down_contexts_
// member for the if statement below.
- if (touch_down_context_)
+ if (touch_down_contexts_)
return MA_NOACTIVATE;
// On Windows, if we select the menu item by touch and if the window at the
@@ -2105,7 +2105,7 @@ LRESULT HWNDMessageHandler::OnTouchEvent(UINT message,
if (input[i].dwFlags & TOUCHEVENTF_DOWN) {
touch_ids_.insert(input[i].dwID);
touch_event_type = ui::ET_TOUCH_PRESSED;
- touch_down_context_ = true;
+ touch_down_contexts_++;
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&HWNDMessageHandler::ResetTouchDownContext,
@@ -2261,7 +2261,7 @@ void HWNDMessageHandler::HandleTouchEvents(const TouchEvents& touch_events) {
}
void HWNDMessageHandler::ResetTouchDownContext() {
- touch_down_context_ = false;
+ touch_down_contexts_--;
}
LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
« no previous file with comments | « ui/views/win/hwnd_message_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698