Lines Matching refs:window
20 static bool WindowSupportsRerouteMouseWheel(HWND window) {
21 while (GetWindowLong(window, GWL_STYLE) & WS_CHILD) {
22 if (!IsWindow(window))
25 if (ViewProp::GetValue(window, kHWNDSupportMouseWheelRerouting) != NULL) {
28 window = GetParent(window);
33 static bool IsCompatibleWithMouseWheelRedirection(HWND window) {
34 std::wstring class_name = gfx::GetClassName(window);
41 static bool CanRedirectMouseWheelFrom(HWND window) {
42 std::wstring class_name = gfx::GetClassName(window);
44 // Older Thinkpad mouse wheel drivers create a window under mouse wheel
45 // pointer. Detect if we are dealing with this window. In this case we
47 // mouse wheel messages to the right window.
60 bool RerouteMouseWheel(HWND window, WPARAM w_param, LPARAM l_param) {
61 // Since this is called from a subclass for every window, we can get
68 // Check if this window's class has a bad interaction with rerouting.
69 if (!IsCompatibleWithMouseWheelRedirection(window))
79 // Find the lowest Chrome window in the hierarchy that can be the
81 while (window != window_under_wheel) {
82 // If window_under_wheel is not a valid Chrome window, then return true to
89 if (IsChild(window, window_under_wheel)) {
90 // If this message is reflected from a child window in a different
95 // The wheel is scrolling over an unrelated window. Make sure that we
96 // have marked that window as supporting mouse wheel rerouting.
104 // window_under_wheel is a Chrome window. If allowed, redirect.