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

Side by Side Diff: ui/views/mus/mus_client.cc

Issue 2715513006: Fix showing the sibling menu on mouse move (Closed)
Patch Set: Fix compile error Created 3 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 unified diff | Download patch
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mus/mus_client.h" 5 #include "ui/views/mus/mus_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "services/service_manager/public/cpp/connection.h" 10 #include "services/service_manager/public/cpp/connection.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 aura::Window* MusClient::GetWindowAtScreenPoint(const gfx::Point& point) { 294 aura::Window* MusClient::GetWindowAtScreenPoint(const gfx::Point& point) {
295 for (aura::Window* root : window_tree_client_->GetRoots()) { 295 for (aura::Window* root : window_tree_client_->GetRoots()) {
296 aura::WindowTreeHost* window_tree_host = root->GetHost(); 296 aura::WindowTreeHost* window_tree_host = root->GetHost();
297 if (!window_tree_host) 297 if (!window_tree_host)
298 continue; 298 continue;
299 // TODO: this likely gets z-order wrong. http://crbug.com/663606. 299 // TODO: this likely gets z-order wrong. http://crbug.com/663606.
300 gfx::Point relative_point(point); 300 gfx::Point relative_point(point);
301 window_tree_host->ConvertScreenInPixelsToDIP(&relative_point); 301 window_tree_host->ConvertScreenInPixelsToDIP(&relative_point);
302 if (gfx::Rect(root->bounds().size()).Contains(relative_point)) 302 if (gfx::Rect(root->bounds().size()).Contains(relative_point))
303 return root->GetTopWindowContainingPoint(relative_point); 303 return root->GetEventHandlerForPoint(relative_point);
304 } 304 }
305 return nullptr; 305 return nullptr;
306 } 306 }
307 307
308 } // namespace views 308 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698