| 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..201bbb024e1681e8096f05a263be36948fa1af17 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::IsTouchEnabled())
|
| + 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
|
|
|