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

Unified Diff: athena/screen/screen_manager_impl.cc

Issue 533403002: Fix touch selection for Athena home card (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed NeedsNotificationWhenVisibleBoundsChange() Created 6 years, 3 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 | « athena/home/home_card_impl.cc ('k') | chrome/browser/ui/views/frame/contents_web_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/screen/screen_manager_impl.cc
diff --git a/athena/screen/screen_manager_impl.cc b/athena/screen/screen_manager_impl.cc
index a154d522f2edcec74117a63d3aacab35e7fd2054..27bcf7576bac87f6bd92cf91495bda02d5085952 100644
--- a/athena/screen/screen_manager_impl.cc
+++ b/athena/screen/screen_manager_impl.cc
@@ -25,6 +25,7 @@
#include "ui/wm/core/base_focus_rules.h"
#include "ui/wm/core/capture_controller.h"
#include "ui/wm/core/focus_controller.h"
+#include "ui/wm/core/window_util.h"
namespace athena {
namespace {
@@ -43,12 +44,10 @@ bool GrabsInput(aura::Window* container) {
// Returns the container which contains |window|.
aura::Window* GetContainer(aura::Window* window) {
- // No containers for NULL or the root window itself.
- if (!window || !window->parent())
- return NULL;
- if (window->parent()->IsRootWindow())
- return window;
- return GetContainer(window->parent());
+ aura::Window* container = window;
+ while (container && !container->GetProperty(kContainerParamsKey))
+ container = container->parent();
+ return container;
}
class AthenaFocusRules : public wm::BaseFocusRules {
@@ -95,6 +94,9 @@ class AthenaWindowTreeClient : public aura::client::WindowTreeClient {
virtual aura::Window* GetDefaultParent(aura::Window* context,
aura::Window* window,
const gfx::Rect& bounds) OVERRIDE {
+ aura::Window* transient_parent = wm::GetTransientParent(window);
+ if (transient_parent)
+ return GetContainer(transient_parent);
return container_;
}
« no previous file with comments | « athena/home/home_card_impl.cc ('k') | chrome/browser/ui/views/frame/contents_web_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698