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

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

Issue 19805005: Refactored touch-events flag test, correcting "enabled" logic. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Renamed IsTouchEnabled to AreTouchEventsEnabled. Created 7 years, 5 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/ui.gyp ('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 5facaac69cbc08e7a63daed6b5da572f6c25b298..56d032065926d4bb1a36277695a7492e438cb60f 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -14,6 +14,7 @@
#include "ui/base/events/event_utils.h"
#include "ui/base/gestures/gesture_sequence.h"
#include "ui/base/keycodes/keyboard_code_conversion_win.h"
+#include "ui/base/touch/touch_enabled.h"
#include "ui/base/win/dpi.h"
#include "ui/base/win/hwnd_util.h"
#include "ui/base/win/mouse_wheel_util.h"
@@ -1287,8 +1288,9 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
// Get access to a modifiable copy of the system menu.
GetSystemMenu(hwnd(), false);
- if (base::win::GetVersion() >= base::win::VERSION_WIN7)
- RegisterTouchWindow(hwnd(), 0);
+ if (base::win::GetVersion() >= base::win::VERSION_WIN7 &&
+ ui::AreTouchEventsEnabled())
+ RegisterTouchWindow(hwnd(), TWF_WANTPALM);
// We need to allow the delegate to size its contents since the window may not
// receive a size notification when its initial bounds are specified at window
« no previous file with comments | « ui/ui.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698