mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: fire show event when BrowserWindow shown via maximize() (#33214)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
@@ -580,11 +580,13 @@ void NativeWindowViews::SetEnabledInternal(bool enable) {
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
void NativeWindowViews::Maximize() {
|
||||
if (IsVisible())
|
||||
if (IsVisible()) {
|
||||
widget()->Maximize();
|
||||
else
|
||||
} else {
|
||||
widget()->native_widget_private()->Show(ui::SHOW_STATE_MAXIMIZED,
|
||||
gfx::Rect());
|
||||
NotifyWindowShow();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -178,12 +178,13 @@ HHOOK NativeWindowViews::mouse_hook_ = NULL;
|
||||
void NativeWindowViews::Maximize() {
|
||||
// Only use Maximize() when window is NOT transparent style
|
||||
if (!transparent()) {
|
||||
if (IsVisible())
|
||||
if (IsVisible()) {
|
||||
widget()->Maximize();
|
||||
else
|
||||
} else {
|
||||
widget()->native_widget_private()->Show(ui::SHOW_STATE_MAXIMIZED,
|
||||
gfx::Rect());
|
||||
return;
|
||||
NotifyWindowShow();
|
||||
}
|
||||
} else {
|
||||
restore_bounds_ = GetBounds();
|
||||
auto display = display::Screen::GetScreen()->GetDisplayNearestWindow(
|
||||
|
||||
Reference in New Issue
Block a user