Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Unified Diff: ui/views/widget/desktop_aura/x11_topmost_window_finder.cc

Issue 291583003: Revert of Fix X11TopmostWindowFinder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698