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

Unified Diff: components/mus/public/cpp/lib/window.cc

Issue 1864113002: Fixes problems with drawn state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: parentdrawn and merge Created 4 years, 8 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 | « no previous file | components/mus/public/cpp/lib/window_private.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/public/cpp/lib/window.cc
diff --git a/components/mus/public/cpp/lib/window.cc b/components/mus/public/cpp/lib/window.cc
index d9a45ae2e9a3dee66497acf9ff7567b110c32437..022e8fe834f727aef0296928aa54728449ad300e 100644
--- a/components/mus/public/cpp/lib/window.cc
+++ b/components/mus/public/cpp/lib/window.cc
@@ -234,7 +234,7 @@ void Window::SetPredefinedCursor(mus::mojom::Cursor cursor_id) {
bool Window::IsDrawn() const {
if (!visible_)
return false;
- return parent_ ? parent_->IsDrawn() : drawn_;
+ return parent_ ? parent_->IsDrawn() : parent_drawn_;
}
scoped_ptr<WindowSurface> Window::RequestSurface(mojom::SurfaceType type) {
@@ -505,7 +505,7 @@ Window::Window(WindowTreeConnection* connection, Id id)
viewport_metrics_(CreateEmptyViewportMetrics()),
visible_(false),
cursor_id_(mojom::Cursor::CURSOR_NULL),
- drawn_(false) {}
+ parent_drawn_(false) {}
WindowTreeClientImpl* Window::tree_client() {
return static_cast<WindowTreeClientImpl*>(connection_);
@@ -637,18 +637,18 @@ void Window::LocalSetViewportMetrics(
OnWindowViewportMetricsChanged(this, old_metrics, new_metrics));
}
-void Window::LocalSetDrawn(bool value) {
- if (drawn_ == value)
+void Window::LocalSetParentDrawn(bool value) {
+ if (parent_drawn_ == value)
return;
- // As IsDrawn() is derived from |visible_| and |drawn_|, only send drawn
- // notification is the value of IsDrawn() is really changing.
+ // As IsDrawn() is derived from |visible_| and |parent_drawn_|, only send
+ // drawn notification is the value of IsDrawn() is really changing.
if (IsDrawn() == value) {
- drawn_ = value;
+ parent_drawn_ = value;
return;
}
FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowDrawnChanging(this));
- drawn_ = value;
+ parent_drawn_ = value;
FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowDrawnChanged(this));
}
« no previous file with comments | « no previous file | components/mus/public/cpp/lib/window_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698