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

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: remove unneeded parens Created 6 years, 11 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 | « ui/views/views.gyp ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b4541d0600f64b558a314e98453fc26f2c3dfdb3..00e3f6d40332b8ecc9de30b2266892490a22f514 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/window_util.h"
#include "ui/views/ime/input_method.h"
#include "ui/views/linux_ui/linux_ui.h"
#include "ui/views/views_delegate.h"
@@ -241,8 +242,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.
@@ -366,9 +368,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;
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698