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

Unified Diff: ui/views/widget/native_widget_mac.mm

Issue 2502813003: MacViews: Set initial window size constraints in OnWidgetInitDone rather than OnRootViewLayout. (Closed)
Patch Set: Created 4 years, 1 month 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/native_widget_mac.mm
diff --git a/ui/views/widget/native_widget_mac.mm b/ui/views/widget/native_widget_mac.mm
index 5c0217a4e8229e2d308937f3db5239987f45ede5..8085ca4c535ce968896675a02c6a973e4cf78fb5 100644
--- a/ui/views/widget/native_widget_mac.mm
+++ b/ui/views/widget/native_widget_mac.mm
@@ -143,7 +143,9 @@ void NativeWidgetMac::InitNativeWidget(const Widget::InitParams& params) {
bridge_->CreateLayer(params.layer_type, translucent);
}
-void NativeWidgetMac::OnWidgetInitDone() {}
+void NativeWidgetMac::OnWidgetInitDone() {
+ OnSizeConstraintsChanged();
+}
NonClientFrameView* NativeWidgetMac::CreateNonClientFrameView() {
return new NativeFrameView(GetWidget());
@@ -601,11 +603,7 @@ ui::NativeTheme* NativeWidgetMac::GetNativeTheme() const {
return ui::NativeThemeMac::instance();
}
-void NativeWidgetMac::OnRootViewLayout() {
- // Ensure possible changes to the non-client view (e.g. Minimum/Maximum size)
- // propagate through to the NSWindow properties.
- OnSizeConstraintsChanged();
-}
+void NativeWidgetMac::OnRootViewLayout() {}
bool NativeWidgetMac::IsTranslucentWindowOpacitySupported() const {
return false;
« 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