Index: chrome/browser/ui/gtk/tabs/dock_info_gtk.cc |
diff --git a/chrome/browser/ui/gtk/tabs/dock_info_gtk.cc b/chrome/browser/ui/gtk/tabs/dock_info_gtk.cc |
index bd528a470d83751e1b81961b8b0ae37e9861f001..6a507cd8890fdb00e130d72c21ad00deaca5c0ce 100644 |
--- a/chrome/browser/ui/gtk/tabs/dock_info_gtk.cc |
+++ b/chrome/browser/ui/gtk/tabs/dock_info_gtk.cc |
@@ -81,14 +81,8 @@ class TopMostFinder : public BaseWindowFinder { |
return false; |
} |
- gfx::Rect rect; |
- if (ui::GetWindowRect(window, &rect) && rect.Contains(screen_loc_)) { |
- // At this point we haven't found our target window, so this window is |
- // higher in the z-order than the target window. If this window contains |
- // the point, then we can stop the search now because this window is |
- // obscuring the target window at this point. |
+ if (ui::WindowContainsPoint(window, screen_loc_)) |
return true; |
- } |
return false; |
} |
@@ -149,8 +143,7 @@ class LocalProcessWindowFinder : public BaseWindowFinder { |
if (!ui::IsWindowVisible(window)) |
return false; |
- gfx::Rect rect; |
- if (ui::GetWindowRect(window, &rect) && rect.Contains(screen_loc_)) { |
+ if (ui::WindowContainsPoint(window, screen_loc_)) { |
result_ = window; |
return true; |
} |