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

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: 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
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..3671be383e443802e74046f2215a8096ac751538 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 {
@@ -95,6 +96,13 @@ 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) {
+ aura::Window* container = transient_parent->parent();
+ while (container && container->type() != ui::wm::WINDOW_TYPE_UNKNOWN)
+ container = container->parent();
+ return container;
oshima 2014/09/04 00:23:35 can you check if the window has ContainerParams in
mohsen 2014/09/04 14:57:22 I just saw that there is a GetContainer() function
+ }
return container_;
}

Powered by Google App Engine
This is Rietveld 408576698