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

Unified Diff: ui/base/win/mouse_wheel_util.cc

Issue 1261253003: Don't route mouse wheel events to transparent children (Legacy_RenderWidgetHostHWND). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/mouse_wheel_util.cc
diff --git a/ui/base/win/mouse_wheel_util.cc b/ui/base/win/mouse_wheel_util.cc
index 223e3a8ee5002d48d4b9d398b4e18380b197171b..020c70c17bf7c3e7ffedb3052b288909f2437ed9 100644
--- a/ui/base/win/mouse_wheel_util.cc
+++ b/ui/base/win/mouse_wheel_util.cc
@@ -101,6 +101,14 @@ bool RerouteMouseWheel(HWND window, WPARAM w_param, LPARAM l_param) {
}
}
+ // If the child window is transparent, then it is not interested in
+ // receiving wheel events.
+ if (IsChild(window, window_under_wheel) &&
+ ::GetWindowLong(
+ window_under_wheel, GWL_EXSTYLE) & WS_EX_TRANSPARENT) {
+ return false;
+ }
+
// window_under_wheel is a Chrome window. If allowed, redirect.
if (IsCompatibleWithMouseWheelRedirection(window_under_wheel)) {
base::AutoReset<bool> auto_reset_recursion_break(&recursion_break, true);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698