fix: maximized window bounds when toggle setResizable (#40503)
This commit is contained in:
parent
2029224a84
commit
3340bc1bf9
5 changed files with 94 additions and 4 deletions
|
@ -30,6 +30,16 @@ void ElectronDesktopNativeWidgetAura::InitNativeWidget(
|
|||
views::DesktopNativeWidgetAura::InitNativeWidget(std::move(params));
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
void ElectronDesktopNativeWidgetAura::OnSizeConstraintsChanged() {
|
||||
views::DesktopNativeWidgetAura::OnSizeConstraintsChanged();
|
||||
|
||||
// OnSizeConstraintsChanged can remove thick frame depending from
|
||||
// resizable state, so add it if needed.
|
||||
native_window_view_->UpdateThickFrame();
|
||||
}
|
||||
#endif
|
||||
|
||||
void ElectronDesktopNativeWidgetAura::Activate() {
|
||||
// Activate can cause the focused window to be blurred so only
|
||||
// call when the window being activated is visible. This prevents
|
||||
|
|
|
@ -27,6 +27,9 @@ class ElectronDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura {
|
|||
|
||||
// views::DesktopNativeWidgetAura:
|
||||
void InitNativeWidget(views::Widget::InitParams params) override;
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
void OnSizeConstraintsChanged() override;
|
||||
#endif
|
||||
|
||||
// internal::NativeWidgetPrivate:
|
||||
void Activate() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue