| Index: ui/views/widget/desktop_aura/x11_topmost_window_finder.cc
|
| diff --git a/ui/views/widget/desktop_aura/x11_topmost_window_finder.cc b/ui/views/widget/desktop_aura/x11_topmost_window_finder.cc
|
| index d59b46cf3798755f1bfc8a11995b0723e64cbc18..eb0d1bdcba917bb24b5067b87f1dcc5a9bd7de45 100644
|
| --- a/ui/views/widget/desktop_aura/x11_topmost_window_finder.cc
|
| +++ b/ui/views/widget/desktop_aura/x11_topmost_window_finder.cc
|
| @@ -4,9 +4,6 @@
|
|
|
| #include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h"
|
|
|
| -#include <X11/Xutil.h>
|
| -
|
| -#include "ui/aura/client/screen_position_client.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
|
|
|
| @@ -37,7 +34,7 @@
|
| return NULL;
|
|
|
| ui::EnumerateTopLevelWindows(this);
|
| - return DesktopWindowTreeHostX11::GetContentWindowForXID(toplevel_);
|
| + return views::DesktopWindowTreeHostX11::GetContentWindowForXID(toplevel_);
|
| }
|
|
|
| XID X11TopmostWindowFinder::FindWindowAt(const gfx::Point& screen_loc) {
|
| @@ -74,24 +71,8 @@
|
|
|
| // Currently |window|->IsVisible() always returns true.
|
| // TODO(pkotwicz): Fix this. crbug.com/353038
|
| - if (!window->IsVisible())
|
| - return false;
|
| -
|
| - DesktopWindowTreeHostX11* host =
|
| - DesktopWindowTreeHostX11::GetHostForXID(
|
| - window->GetHost()->GetAcceleratedWidget());
|
| - if (!host->GetX11RootWindowOuterBounds().Contains(screen_loc_))
|
| - return false;
|
| -
|
| - ::Region shape = host->GetWindowShape();
|
| - if (!shape)
|
| - return true;
|
| -
|
| - aura::client::ScreenPositionClient* screen_position_client =
|
| - aura::client::GetScreenPositionClient(window->GetRootWindow());
|
| - gfx::Point window_loc(screen_loc_);
|
| - screen_position_client->ConvertPointFromScreen(window, &window_loc);
|
| - return XPointInRegion(shape, window_loc.x(), window_loc.y()) == True;
|
| + return window->IsVisible() &&
|
| + window->GetBoundsInScreen().Contains(screen_loc_);
|
| }
|
|
|
| } // namespace views
|
|
|