Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Non-resizable windows can still be maximized on Macs the first time #39077

Closed
3 tasks done
pushkin- opened this issue Jul 12, 2023 · 2 comments · Fixed by #39086
Closed
3 tasks done

[Bug]: Non-resizable windows can still be maximized on Macs the first time #39077

pushkin- opened this issue Jul 12, 2023 · 2 comments · Fixed by #39086
Assignees
Labels
25-x-y 26-x-y bug 🪲 component/BrowserWindow has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/macOS status/confirmed A maintainer reproduced the bug or agreed with the feature

Comments

@pushkin-
Copy link

pushkin- commented Jul 12, 2023

Preflight Checklist

Electron Version

25.2.0

What operating system are you using?

macOS

Operating System Version

macOS Ventura 13.2.1

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

No response

Expected Behavior

I expect that if I set resizable:false on a BrowserWindow, I won't be able to maximize/fullscreen it.

Actual Behavior

The green maximize button is enabled and I can maximized. When I click it again however and the window restores to the normal size, then it becomes disabled.

Testcase Gist URL

https://gist.github.com/pushkin-/67fb41db75da3eb6dbaa34d39d34fabf

Additional Information

Start the gist, maximize the window, unmaximize it, notice the green maximize button is now correctly disabled.

I also get a bunch of logs in the console when I fullscreen the window for some reason:

1   HIToolbox                           0x000000018c4905c8 _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 120

2   HIToolbox                           0x000000018c490188 _ZN15MenuBarInstance14EnableAutoShowEv + 60

3   HIToolbox                           0x000000018c3fd8bc _ZN15MenuBarInstance21UpdateAggregateUIModeE21MenuBarAnimationStylehhh + 1184

4   HIToolbox                           0x000000018c490004 _ZN15MenuBarInstance19SetFullScreenUIModeEjj + 180

5   AppKit                              0x000000018627fd30 -[NSApplication _setPresentationOptions:instance:flags:] + 956

6   AppKit                              0x000000018611593c -[NSApplication _updateFullScreenPresentationOptionsForInstance:] + 404

7   CoreFoundation                      0x0000000182d32560 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148

8   CoreFoundation                      0x0000000182dd0044 ___CFXRegistrationPost_block_invoke + 88

9   CoreFoundation                      0x0000000182dcff8c _CFXRegistrationPost + 440

10  CoreFoundation                      0x0000000182d03b64 _CFXNotificationPost + 708

11  Foundation                          0x0000000183bf338c -[NSNotificationCenter postNotificationName:object:userInfo:] + 88

12  AppKit                              0x00000001862802b4 spacesNotificationHandler + 96

13  SkyLight                            0x000000018796d214 _ZN12_GLOBAL__N_123notify_datagram_handlerEj15CGSDatagramTypePvmS1_ + 896

14  SkyLight                            0x0000000187c994d4 _ZN21CGSDatagramReadStream26dispatchMainQueueDatagramsEv + 228

15  SkyLight                            0x0000000187c993d0 ___ZN21CGSDatagramReadStream15mainQueueWakeupEv_block_invoke + 28

16  libdispatch.dylib                   0x0000000182ad49dc _dispatch_call_block_and_release + 32

17  libdispatch.dylib                   0x0000000182ad6504 _dispatch_client_callout + 20

18  libdispatch.dylib                   0x0000000182ae4d1c _dispatch_main_queue_drain + 928

19  libdispatch.dylib                   0x0000000182ae496c _dispatch_main_queue_callback_4CF + 44

20  CoreFoundation                      0x0000000182d7ed40 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16

21  CoreFoundation                      0x0000000182d3c7c0 __CFRunLoopRun + 2036

22  CoreFoundation                      0x0000000182d3b878 CFRunLoopRunSpecific + 612

23  HIToolbox                           0x000000018c41bfa0 RunCurrentEventLoopInMode + 292

24  HIToolbox                           0x000000018c41bde4 ReceiveNextEventCommon + 672

25  HIToolbox                           0x000000018c41bb2c _BlockUntilNextEventMatchingListInModeWithFilter + 72

26  AppKit                              0x0000000185fc184c _DPSNextEvent + 632

27  AppKit                              0x0000000185fc09dc -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728

28  AppKit                              0x0000000185fb4e0c -[NSApplication run] + 464

29  Electron Framework                  0x000000010da2e958 _ZN4node23GetMultiIsolatePlatformEPNS_11IsolateDataE + 9089840

30  Electron Framework                  0x000000010da2d050 _ZN4node23GetMultiIsolatePlatformEPNS_11IsolateDataE + 9083432

31  Electron Framework                  0x000000010d9e0c28 _ZN4node23GetMultiIsolatePlatformEPNS_11IsolateDataE + 8771072

32  Electron Framework                  0x000000010d9ab0b4 _ZN4node23GetMultiIsolatePlatformEPNS_11IsolateDataE + 8551052

33  Electron Framework                  0x000000010cc9ba10 _ZN2v88internal20SetupIsolateDelegate13SetupBuiltinsEPNS0_7IsolateEb + 3653888

34  Electron Framework                  0x000000010cc9d324 _ZN2v88internal20SetupIsolateDelegate13SetupBuiltinsEPNS0_7IsolateEb + 3660308

35  Electron Framework                  0x000000010cc9969c _ZN2v88internal20SetupIsolateDelegate13SetupBuiltinsEPNS0_7IsolateEb + 3644812

36  Electron Framework                  0x000000010afa5ff4 _ZN2v88internal8compiler10BasicBlock15set_loop_headerEPS2_ + 13524

37  Electron Framework                  0x000000010afa6f00 _ZN2v88internal8compiler10BasicBlock15set_loop_headerEPS2_ + 17376

38  Electron Framework                  0x000000010afa6d50 _ZN2v88internal8compiler10BasicBlock15set_loop_headerEPS2_ + 16944

39  Electron Framework                  0x000000010afa5814 _ZN2v88internal8compiler10BasicBlock15set_loop_headerEPS2_ + 11508

40  Electron Framework                  0x000000010afa5a40 _ZN2v88internal8compiler10BasicBlock15set_loop_headerEPS2_ + 12064

41  Electron Framework                  0x000000010acd91d8 ElectronMain + 128

42  dyld                                0x0000000182933e50 start + 2544

1   HIToolbox                           0x000000018c41b90c _ZN15MenuBarInstance22RemoveAutoShowObserverEv + 44

2   HIToolbox                           0x000000018c490fbc _ZN15MenuBarInstance15DisableAutoShowEv + 36

3   HIToolbox                           0x000000018c4910b0 _ZN15MenuBarInstanceD2Ev + 128

4   HIToolbox                           0x000000018c490ee0 _ZN15MenuBarInstance7ReleaseEv + 56

5   AppKit                              0x000000018661d4dc -[NSHIPresentationInstance discard] + 228

6   AppKit                              0x00000001869dc8b4 -[_NSFullScreenSpace(PresentationInstance) discardPresentationInstance] + 32

7   AppKit                              0x00000001869dc90c -[_NSFullScreenSpace(PresentationInstance) activateFullScreenPresentationOptions] + 64

8   AppKit                              0x0000000186836968 -[_NSExitFullScreenTransitionController _doSucceededToExitFullScreen] + 40

9   AppKit                              0x0000000186837440 __63-[_NSExitFullScreenTransitionController _performExitFullScreen]_block_invoke + 236

10  libxpc.dylib                        0x00000001829ce42c _xpc_connection_reply_callout + 124

11  libxpc.dylib                        0x00000001829ce31c _xpc_connection_call_reply_async + 88

12  libdispatch.dylib                   0x0000000182ad6584 _dispatch_client_callout3 + 20

13  libdispatch.dylib                   0x0000000182af4710 _dispatch_mach_msg_async_reply_invoke + 344

14  libdispatch.dylib                   0x0000000182ae4c70 _dispatch_main_queue_drain + 756

15  libdispatch.dylib                   0x0000000182ae496c _dispatch_main_queue_callback_4CF + 44

16  CoreFoundation                      0x0000000182d7ed40 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16

17  CoreFoundation                      0x0000000182d3c7c0 __CFRunLoopRun + 2036

18  CoreFoundation                      0x0000000182d3b878 CFRunLoopRunSpecific + 612

19  HIToolbox                           0x000000018c41bfa0 RunCurrentEventLoopInMode + 292

20  HIToolbox                           0x000000018c41bc30 ReceiveNextEventCommon + 236

21  HIToolbox                           0x000000018c41bb2c _BlockUntilNextEventMatchingListInModeWithFilter + 72

22  AppKit                              0x0000000185fc184c _DPSNextEvent + 632

23  AppKit                              0x0000000185fc09dc -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728

24  AppKit                              0x0000000185fb4e0c -[NSApplication run] + 464

25  Electron Framework                  0x000000010da2e958 _ZN4node23GetMultiIsolatePlatformEPNS_11IsolateDataE + 9089840

26  Electron Framework                  0x000000010da2d050 _ZN4node23GetMultiIsolatePlatformEPNS_11IsolateDataE + 9083432

27  Electron Framework                  0x000000010d9e0c28 _ZN4node23GetMultiIsolatePlatformEPNS_11IsolateDataE + 8771072

28  Electron Framework                  0x000000010d9ab0b4 _ZN4node23GetMultiIsolatePlatformEPNS_11IsolateDataE + 8551052

29  Electron Framework                  0x000000010cc9ba10 _ZN2v88internal20SetupIsolateDelegate13SetupBuiltinsEPNS0_7IsolateEb + 3653888

30  Electron Framework                  0x000000010cc9d324 _ZN2v88internal20SetupIsolateDelegate13SetupBuiltinsEPNS0_7IsolateEb + 3660308

31  Electron Framework                  0x000000010cc9969c _ZN2v88internal20SetupIsolateDelegate13SetupBuiltinsEPNS0_7IsolateEb + 3644812

32  Electron Framework                  0x000000010afa5ff4 _ZN2v88internal8compiler10BasicBlock15set_loop_headerEPS2_ + 13524

33  Electron Framework                  0x000000010afa6f00 _ZN2v88internal8compiler10BasicBlock15set_loop_headerEPS2_ + 17376

34  Electron Framework                  0x000000010afa6d50 _ZN2v88internal8compiler10BasicBlock15set_loop_headerEPS2_ + 16944

35  Electron Framework                  0x000000010afa5814 _ZN2v88internal8compiler10BasicBlock15set_loop_headerEPS2_ + 11508

36  Electron Framework                  0x000000010afa5a40 _ZN2v88internal8compiler10BasicBlock15set_loop_headerEPS2_ + 12064

37  Electron Framework                  0x000000010acd91d8 ElectronMain + 128

38  dyld                                0x0000000182933e50 start + 2544
@pushkin-
Copy link
Author

though I'm realizing now that I'm not maximize the window (that doesn't work), I'm actually fullscreening it.

@codebytere
Copy link
Member

@pushkin- the logs are known and unrelated - it's a macOS Ventura issue (see #36891). I'll look into the other issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
25-x-y 26-x-y bug 🪲 component/BrowserWindow has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/macOS status/confirmed A maintainer reproduced the bug or agreed with the feature
Projects
No open projects
Status: Unsorted Items
Status: 🛠 Fixed for Next Release
Development

Successfully merging a pull request may close this issue.

2 participants