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

Unified Diff: mojo/services/view_manager/window_tree_host_impl.cc

Issue 354933002: Connect X11 ConfigureNotify events to Mojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed X11 support for --start-fullscreen, --start-maximized Created 6 years, 6 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: mojo/services/view_manager/window_tree_host_impl.cc
diff --git a/mojo/services/view_manager/window_tree_host_impl.cc b/mojo/services/view_manager/window_tree_host_impl.cc
index b82da1df71c7b3ac60218a35a4118bf412d6df75..7dd8696a98dc209721b280049543949d7b43bea1 100644
--- a/mojo/services/view_manager/window_tree_host_impl.cc
+++ b/mojo/services/view_manager/window_tree_host_impl.cc
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "mojo/services/view_manager/root_node_manager.h"
#include "mojo/services/view_manager/window_tree_host_impl.h"
-
#include "mojo/public/c/gles2/gles2.h"
#include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
#include "mojo/services/view_manager/context_factory_impl.h"
@@ -30,10 +30,12 @@ ContextFactoryImpl* WindowTreeHostImpl::context_factory_ = NULL;
WindowTreeHostImpl::WindowTreeHostImpl(
NativeViewportPtr viewport,
const gfx::Rect& bounds,
+ RootNodeManager* root_node_manager,
const base::Callback<void()>& compositor_created_callback)
: native_viewport_(viewport.Pass()),
compositor_created_callback_(compositor_created_callback),
- bounds_(bounds) {
+ bounds_(bounds),
+ root_node_manager_(root_node_manager) {
native_viewport_.set_client(this);
native_viewport_->Create(Rect::From(bounds));
@@ -137,6 +139,11 @@ void WindowTreeHostImpl::OnCreated() {
void WindowTreeHostImpl::OnBoundsChanged(RectPtr bounds) {
bounds_ = bounds.To<gfx::Rect>();
OnHostResized(bounds_.size());
+
+ Node* root_node = root_node_manager_->root();
Ben Goodger (Google) 2014/07/08 15:41:57 Instead of doing this (and adding the root_node_ma
+ if (bounds_ == root_node->bounds())
+ return;
+ root_node->window()->SetBounds(bounds_);
}
void WindowTreeHostImpl::OnDestroyed() {

Powered by Google App Engine
This is Rietveld 408576698