mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: on macOS show BrowserWindow on maximize if not currently shown (#34365)
fix: on macOS show BrowserWindow on maximize if not currently shown (#32949)
This commit is contained in:
@@ -608,13 +608,23 @@ void NativeWindowMac::SetEnabled(bool enable) {
|
||||
}
|
||||
|
||||
void NativeWindowMac::Maximize() {
|
||||
if (IsMaximized())
|
||||
const bool is_visible = [window_ isVisible];
|
||||
|
||||
if (IsMaximized()) {
|
||||
if (!is_visible)
|
||||
ShowInactive();
|
||||
return;
|
||||
}
|
||||
|
||||
// Take note of the current window size
|
||||
if (IsNormal())
|
||||
original_frame_ = [window_ frame];
|
||||
[window_ zoom:nil];
|
||||
|
||||
if (!is_visible) {
|
||||
ShowInactive();
|
||||
NotifyWindowMaximize();
|
||||
}
|
||||
}
|
||||
|
||||
void NativeWindowMac::Unmaximize() {
|
||||
|
||||
Reference in New Issue
Block a user