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

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

Issue 330873003: Fix first time switching from classic to GTK theme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: longer comment 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index c8b82395f73daa9de5b0ce9c800698caeea88652..fdcb32af915e97a73fead05becf0ac0c83dece35 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -356,7 +356,6 @@ void Widget::Init(const InitParams& in_params) {
internal::NativeWidgetPrivate::IsMouseButtonDown();
}
native_widget_->InitNativeWidget(params);
- observer_manager_.Add(GetNativeTheme());
if (RequiresNonClientView(params.type)) {
non_client_view_ = new NonClientView;
non_client_view_->SetFrameView(CreateNonClientFrameView());
@@ -378,6 +377,9 @@ void Widget::Init(const InitParams& in_params) {
SetContentsView(params.delegate->GetContentsView());
SetInitialBoundsForFramelessWindow(params.bounds);
}
+ // This must come after SetContentsView() or it might not be able to find
+ // the correct NativeTheme (on Linux). See http://crbug.com/384492
+ observer_manager_.Add(GetNativeTheme());
native_widget_initialized_ = true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698