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

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

Issue 115453004: Moves management of transients out of Window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix MRUWindowTracker and MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest Created 7 years 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: ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
index 545e0cde550ffaea30255827af593b2927f3da30..e05fba4ec8f0ec55351f77599a5d6832762dc5a1 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
@@ -37,6 +37,7 @@
#include "ui/views/corewm/compound_event_filter.h"
#include "ui/views/corewm/corewm_switches.h"
#include "ui/views/corewm/tooltip_aura.h"
+#include "ui/views/corewm/transient_window_manager.h"
#include "ui/views/ime/input_method.h"
#include "ui/views/linux_ui/linux_ui.h"
#include "ui/views/views_delegate.h"
@@ -240,8 +241,9 @@ void DesktopRootWindowHostX11::OnRootWindowCreated(
// If we're given a parent, we need to mark ourselves as transient to another
// window. Otherwise activation gets screwy.
gfx::NativeView parent = params.parent;
- if (!params.child && params.parent)
- parent->AddTransientChild(content_window_);
+ if (!params.child && params.parent) {
+ corewm::AddTransientChild(parent, content_window_);
+ }
// Ensure that the X11DesktopHandler exists so that it dispatches activation
// messages to us.
@@ -364,9 +366,9 @@ void DesktopRootWindowHostX11::CenterWindow(const gfx::Size& size) {
// If |window_|'s transient parent bounds are big enough to contain |size|,
// use them instead.
- if (content_window_->transient_parent()) {
+ if (corewm::GetTransientParent(content_window_)) {
gfx::Rect transient_parent_rect =
- content_window_->transient_parent()->GetBoundsInScreen();
+ corewm::GetTransientParent(content_window_)->GetBoundsInScreen();
if (transient_parent_rect.height() >= size.height() &&
transient_parent_rect.width() >= size.width()) {
parent_bounds = transient_parent_rect;

Powered by Google App Engine
This is Rietveld 408576698