What is the safe area on a Mac screen?

Mac basics Published

All of glossary Try NotchStar in the browser Buy for $4

The safe area is the part of a screen that hardware does not cover. On a MacBook with a notch, it is the display minus the cutout. Apple’s AppKit exposes it as NSScreen.safeAreaInsets, which it describes as the distances from the screen’s edges at which content is not obscured.

Why it matters

An app that draws at the top of the screen needs to know how tall the notch is, or its content will sit behind the camera. Reading the inset lets the app place things correctly on each Mac, instead of hard coding a number that only fits one model. Apple lists the property as available from macOS 12.0.

Macs without a notch report a top inset of zero. That is also how an app can tell whether to use the notch or fall back to something else, such as a floating pill.

How NotchStar uses it

NotchStar finds the screen whose top inset is greater than zero, which is the screen with the notch. It then reads the left and right areas beside the notch to size its panel. If no screen has an inset, it uses the main screen and draws a pill. The code is in NotchController.swift.

For the user side of the same idea, read the MacBook notch explained. For Macs with no cutout, see notch apps for Macs without a notch. Developers who work on Mac windows should also know AppKit.

Keep reading.

What is the MacBook notch?
The notch is the cutout at the top of some MacBook screens that holds the camera. Here is what it is, which Macs have it and what it does to the menu bar.
What is AppKit?
AppKit is Apple's older framework for building Mac apps with windows, menus and events. Learn what it covers and why SwiftUI apps still use it.
The MacBook notch explained
What the notch is, which MacBooks have it, why menu bar icons disappear behind it, and the options for working around or making use of it.
Notch apps for Macs without a notch
Do notch apps work on iMac, Mac mini or older MacBooks? Yes, often as a floating pill. Here is what to expect and how NotchStar handles it.

More in Mac basics.

What is the MacBook notch?
The notch is the cutout at the top of some MacBook screens that holds the camera. Here is what it is, which Macs have it and what it does to the menu bar.
What is the Mac menu bar?
The menu bar is the strip along the top of a Mac screen with the Apple menu, app menus and status icons. Learn how it works and how the notch changes it.
What is AirDrop?
AirDrop sends files wirelessly between nearby Apple devices. Learn what it needs, how to use it on a Mac and how a notch file shelf can start a send.
What is Universal Clipboard?
Universal Clipboard lets you copy on one Apple device and paste on another nearby one. Learn what it needs and how it differs from clipboard history.
What is Apple silicon?
Apple silicon is the family of Apple designed chips that replaced Intel processors in Macs. Learn how to tell which chip your Mac has and why apps care.
What is a universal binary on Mac?
A universal binary is one Mac app file that contains code for both Apple silicon and Intel chips, so it runs natively on either. Learn how to check one.
NotchStar app icon

Put your notch to work.

Buy it once for $4, activate it in a minute, and keep it. Not sure yet? Try every tool in the browser on the home page, or install the 7 day trial.