| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/views/widget/desktop_aura/x11_topmost_window_finder.h" | 5 #include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 7 #include <X11/Xutil.h> | 8 #include <X11/Xutil.h> |
| 8 | 9 |
| 9 #include "ui/aura/client/screen_position_client.h" | 10 #include "ui/aura/client/screen_position_client.h" |
| 10 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
| 11 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" | 12 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" |
| 12 | 13 |
| 13 namespace views { | 14 namespace views { |
| 14 | 15 |
| 15 X11TopmostWindowFinder::X11TopmostWindowFinder() : toplevel_(None) { | 16 X11TopmostWindowFinder::X11TopmostWindowFinder() : toplevel_(None) { |
| 16 } | 17 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 return true; | 90 return true; |
| 90 | 91 |
| 91 aura::client::ScreenPositionClient* screen_position_client = | 92 aura::client::ScreenPositionClient* screen_position_client = |
| 92 aura::client::GetScreenPositionClient(window->GetRootWindow()); | 93 aura::client::GetScreenPositionClient(window->GetRootWindow()); |
| 93 gfx::Point window_loc(screen_loc_in_pixels_); | 94 gfx::Point window_loc(screen_loc_in_pixels_); |
| 94 screen_position_client->ConvertPointFromScreen(window, &window_loc); | 95 screen_position_client->ConvertPointFromScreen(window, &window_loc); |
| 95 return XPointInRegion(shape, window_loc.x(), window_loc.y()) == True; | 96 return XPointInRegion(shape, window_loc.x(), window_loc.y()) == True; |
| 96 } | 97 } |
| 97 | 98 |
| 98 } // namespace views | 99 } // namespace views |
| OLD | NEW |