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

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

Issue 236183004: Get horizontal wheel scrolling working again with logitech drivers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 8 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
===================================================================
--- ui/views/win/hwnd_message_handler.cc (revision 263028)
+++ ui/views/win/hwnd_message_handler.cc (working copy)
@@ -359,7 +359,8 @@
id_generator_(0),
needs_scroll_styles_(false),
in_size_loop_(false),
- touch_down_context_(false) {
+ touch_down_context_(false),
+ last_mouse_hwheel_time_(0) {
}
HWNDMessageHandler::~HWNDMessageHandler() {
@@ -2315,6 +2316,18 @@
return 0;
}
+ // Certain logitech drivers send the WM_MOUSEHWHEEL message to the parent
+ // followed by WM_MOUSEWHEEL messages to the child window causing a vertical
+ // scroll. We treat these WM_MOUSEWHEEL messages as WM_MOUSEHWHEEL
+ // messages.
+ if (message == WM_MOUSEHWHEEL)
+ last_mouse_hwheel_time_ = ::GetMessageTime();
+
+ if (message == WM_MOUSEWHEEL &&
+ ::GetMessageTime() == last_mouse_hwheel_time_) {
+ message = WM_MOUSEHWHEEL;
+ }
+
if (message == WM_RBUTTONUP && is_right_mouse_pressed_on_caption_) {
is_right_mouse_pressed_on_caption_ = false;
ReleaseCapture();
« 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