PopupMenu placed over notch on macbook pros

We just found that popup menus are sometimes placed over the notch (for camera at top of display) on macs.
I found that this was caused by this commit:

The juce_PopupMenu.cpp getParentArea() function was changed to subtract the Display::safeAreaInsets from the Display::totalArea instead of using the Display::userArea (on mac and android). However, the safeAreaInsets are not initialized on macos, only on iOS, so the net effect is that the popup menu now goes over the menu bar when previously it would not.

FYI, equivalent code to init the safeAreaInets could be added to mac, starting with the 12.0 SDK:

but just using the userArea, like the code prior to the above commit did, seems reasonable as well.

Thanks,
Rob

1 Like

Related to this, I think:

Thanks for reporting, we now respect the safe area insets on macOS:

1 Like

Great, thanks for the quick fix.

Awesome!!