OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/win_util.h" | 8 #include "base/win_util.h" |
9 #include "chrome/browser/render_widget_host_hwnd.h" | 9 #include "chrome/browser/render_widget_host_hwnd.h" |
10 #include "chrome/common/notification_types.h" | 10 #include "chrome/common/notification_types.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 class_name == L"ComboBoxEx32"); | 40 class_name == L"ComboBoxEx32"); |
41 } | 41 } |
42 | 42 |
43 static bool CanRedirectMouseWheelFrom(HWND window) { | 43 static bool CanRedirectMouseWheelFrom(HWND window) { |
44 std::wstring class_name = win_util::GetClassName(window); | 44 std::wstring class_name = win_util::GetClassName(window); |
45 | 45 |
46 // Older Thinkpad mouse wheel drivers create a window under mouse wheel | 46 // Older Thinkpad mouse wheel drivers create a window under mouse wheel |
47 // pointer. Detect if we are dealing with this window. In this case we | 47 // pointer. Detect if we are dealing with this window. In this case we |
48 // don't need to do anything as the Thinkpad mouse driver will send | 48 // don't need to do anything as the Thinkpad mouse driver will send |
49 // mouse wheel messages to the right window. | 49 // mouse wheel messages to the right window. |
50 if (class_name == L"Syn Visual Class") | 50 if ((class_name == L"Syn Visual Class") || |
| 51 (class_name == L"SynTrackCursorWindowClass")) |
51 return false; | 52 return false; |
52 | 53 |
53 return true; | 54 return true; |
54 } | 55 } |
55 | 56 |
56 bool IsPluginWindow(HWND window) { | 57 bool IsPluginWindow(HWND window) { |
57 HWND current_window = window; | 58 HWND current_window = window; |
58 while (GetWindowLong(current_window, GWL_STYLE) & WS_CHILD) { | 59 while (GetWindowLong(current_window, GWL_STYLE) & WS_CHILD) { |
59 current_window = GetParent(current_window); | 60 current_window = GetParent(current_window); |
60 if (!IsWindow(current_window)) | 61 if (!IsWindow(current_window)) |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 listener); | 772 listener); |
772 if (place == focus_change_listeners_.end()) { | 773 if (place == focus_change_listeners_.end()) { |
773 NOTREACHED() << "Removing a listener that isn't registered."; | 774 NOTREACHED() << "Removing a listener that isn't registered."; |
774 return; | 775 return; |
775 } | 776 } |
776 focus_change_listeners_.erase(place); | 777 focus_change_listeners_.erase(place); |
777 } | 778 } |
778 | 779 |
779 } | 780 } |
780 | 781 |
OLD | NEW |