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

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

Issue 1003863005: Fix tab drag and drop with hi-dpi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tab drag and drop with hi-dpi. Created 5 years, 9 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/x11_topmost_window_finder.h ('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..d5dbd55f38c0914e2dc350bc2590bd995d31ad89 100644
--- a/ui/views/widget/desktop_aura/x11_topmost_window_finder.cc
+++ b/ui/views/widget/desktop_aura/x11_topmost_window_finder.cc
@@ -19,9 +19,9 @@ X11TopmostWindowFinder::~X11TopmostWindowFinder() {
}
aura::Window* X11TopmostWindowFinder::FindLocalProcessWindowAt(
- const gfx::Point& screen_loc,
+ const gfx::Point& screen_loc_in_pixels,
const std::set<aura::Window*>& ignore) {
- screen_loc_ = screen_loc;
+ screen_loc_in_pixels_ = screen_loc_in_pixels;
ignore_ = ignore;
std::vector<aura::Window*> local_process_windows =
@@ -40,8 +40,9 @@ aura::Window* X11TopmostWindowFinder::FindLocalProcessWindowAt(
return DesktopWindowTreeHostX11::GetContentWindowForXID(toplevel_);
}
-XID X11TopmostWindowFinder::FindWindowAt(const gfx::Point& screen_loc) {
- screen_loc_ = screen_loc;
+XID X11TopmostWindowFinder::FindWindowAt(
+ const gfx::Point& screen_loc_in_pixels) {
+ screen_loc_in_pixels_ = screen_loc_in_pixels;
ui::EnumerateTopLevelWindows(this);
return toplevel_;
}
@@ -60,7 +61,7 @@ bool X11TopmostWindowFinder::ShouldStopIterating(XID xid) {
return false;
}
- if (ui::WindowContainsPoint(xid, screen_loc_)) {
+ if (ui::WindowContainsPoint(xid, screen_loc_in_pixels_)) {
toplevel_ = xid;
return true;
}
@@ -80,7 +81,7 @@ bool X11TopmostWindowFinder::ShouldStopIteratingAtLocalProcessWindow(
DesktopWindowTreeHostX11* host =
DesktopWindowTreeHostX11::GetHostForXID(
window->GetHost()->GetAcceleratedWidget());
- if (!host->GetX11RootWindowOuterBounds().Contains(screen_loc_))
+ if (!host->GetX11RootWindowOuterBounds().Contains(screen_loc_in_pixels_))
return false;
::Region shape = host->GetWindowShape();
@@ -89,7 +90,7 @@ bool X11TopmostWindowFinder::ShouldStopIteratingAtLocalProcessWindow(
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(window->GetRootWindow());
- gfx::Point window_loc(screen_loc_);
+ gfx::Point window_loc(screen_loc_in_pixels_);
screen_position_client->ConvertPointFromScreen(window, &window_loc);
return XPointInRegion(shape, window_loc.x(), window_loc.y()) == True;
}
« no previous file with comments | « ui/views/widget/desktop_aura/x11_topmost_window_finder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698