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

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: Check kContainerParamsKey property to find containers 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') | ui/views/controls/textfield/textfield.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..9817b79c71379aec01bd4a3bad44bc9e8ef9b8f4 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,10 +44,9 @@ 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())
+ if (!window)
return NULL;
- if (window->parent()->IsRootWindow())
+ if (window->GetProperty(kContainerParamsKey))
return window;
return GetContainer(window->parent());
oshima 2014/09/04 15:04:53 this is not your fault, but you can change to use
mohsen 2014/09/04 15:39:54 Sure; Done.
}
@@ -95,6 +95,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') | ui/views/controls/textfield/textfield.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698