File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -207,11 +207,17 @@ - (void)toggleFullScreenMode:(id)sender {
207
207
208
208
// If we're in simple fullscreen mode and trying to exit it
209
209
// we need to ensure we exit it properly to prevent a crash
210
- // with NSWindowStyleMaskTitled mode
211
- if (is_simple_fs || always_simple_fs)
210
+ // with NSWindowStyleMaskTitled mode.
211
+ if (is_simple_fs || always_simple_fs) {
212
212
shell_->SetSimpleFullScreen (!is_simple_fs);
213
- else
213
+ } else {
214
+ bool maximizable = shell_->IsMaximizable ();
214
215
[super toggleFullScreen: sender];
216
+
217
+ // Exiting fullscreen causes Cocoa to redraw the NSWindow, which resets
218
+ // the enabled state for NSWindowZoomButton. We need to persist it.
219
+ shell_->SetMaximizable (maximizable);
220
+ }
215
221
}
216
222
217
223
- (void )performMiniaturize : (id )sender {
You can’t perform that action at this time.
0 commit comments