Share one monitor between a Mac and another computer without rebuilding your Mac layout every time you switch back.
Switching a shared monitor's input, or a KVM, makes that display disappear from the Mac, so macOS moves its windows onto the remaining screen and usually leaves them there when you switch back. This comes from how macOS handles a monitor that goes away, not from one monitor brand. SnapState can restore the saved layout when the monitor returns, or from a shortcut.
Short version: when the monitor switches to another input, the Mac usually loses its signal and macOS treats the monitor as unplugged. Check your monitor settings and try the free options first. SnapState can restore your saved layout automatically as soon as the monitor is back on the Mac.
Why do Mac windows move when you switch monitor input?
Most monitors only drive one input at a time. When you switch to HDMI for a PC or to another USB-C port for a work laptop, the monitor often stops talking to the Mac entirely, and a KVM switch generally does the same. From the Mac side this looks like the cable was pulled, so macOS moves the windows from that monitor onto a display that is still connected, usually the built-in laptop screen.
When you switch back, macOS re-detects the monitor as if it were newly plugged in. It does not reliably send each window back to its earlier display and position, so the windows stay where they were moved. It is the same behavior described in restoring windows after unplugging a monitor, just caused by an input button instead of a cable.
What free fixes should you try first?
- Drag windows back by hand. Free, and fine if you only switch occasionally.
- Check your monitor on-screen menu. Many monitors have options related to automatic input detection, input switching, or deep sleep. Names vary by model, so check the manual. On some setups these settings change whether the Mac keeps seeing the monitor when it is not the active input.
- Check the display arrangement.In System Settings > Displays, make sure the arrangement and main display are set the way you want, so macOS treats the monitor consistently each time it comes back. If changing that diagram makes every window jump, see Mac windows jump when the display arrangement changes.
- If you use Spaces.The Displays have separate Spaces option in System Settings > Desktop & Dock, and assigning apps to a desktop from the Dock icon Options menu, can help some setups.
- Try Stay. Stay by Cordless Dog is free since version 1.5.1 and restores window positions for each display setup automatically as displays connect and disconnect. If Stay covers your needs, it is a good free choice. See SnapState vs Stay.
How does SnapState restore the layout after an input switch?
- Arrange your Mac windows with the shared monitor on the Mac input. Put each window where you want it across the shared monitor and any other displays.
- Save the arrangement as a named workspace. Capture it from the SnapState menu bar app and name it something like Shared monitor.
- Arm it to restore when the monitor connects. Turn on the monitor connect or matching display layout trigger, so that when you switch the input back to the Mac and it sees the monitor again, the workspace restores.
- Optionally save a layout for while the monitor is away. If you keep working on the Mac while the monitor shows the other computer, save a second workspace for the remaining screen and arm it for monitor disconnect.
- Restore by hand when you prefer. Pick a workspace from the menu bar or press its Control-Command-1 to 6 shortcut after switching inputs.
SnapState is a native macOS menu bar app. A workspace captures windows on every Space with position and size, the apps needed to relaunch them, the monitor and display layout, and all open tabs of each window in Safari, Chrome, Edge, Brave, Arc, and Chromium once Automation permission is granted. When the shared monitor comes back, the armed trigger moves each saved window back and remaps saved frames onto the current displays if the setup differs. If you use a lid closed desk setup, pair this with the clamshell mode guide.
What are the practical details?
SnapState costs $9.99 as a one-time purchase, with a lifetime license for up to three Macs and a 14-day refund. Version 2.7.1 requires macOS 15.7 or later on Apple Silicon and Intel Macs and ships as a signed, notarized DMG rather than through the Mac App Store. It needs Accessibility permission to move windows, and workspace data stays local on your Mac as JSON in ~/Library/Application Support/SnapState/.
What are the honest limits?
SnapState does not change how your monitor or macOS handles the input switch; it restores your layout afterwards. It restores layouts across multiple Spaces (each Space is restored when you switch to it). Firefox is not supported, tabs are restored only from supported browsers, and it is not a tiling or snapping window manager. It requires macOS 15.7 or later.
What else should you know?
Why do my windows move to my laptop when I switch my monitor input?
Many monitors stop sending a signal to the Mac when you switch them to another input, so macOS sees the monitor as unplugged. It generally moves the windows from that monitor onto a remaining display, often the laptop screen. When you switch back, macOS re-detects the monitor but does not reliably return each window to its earlier position.
Does a KVM switch rearrange Mac windows too?
It often does. Switching a KVM to another computer usually disconnects the monitor from the Mac as far as macOS can tell, so the same thing happens as with a monitor input switch or pulling the cable.
Is there a free fix for sharing one monitor between a Mac and a work laptop or PC?
Check your monitor on-screen menu for options related to automatic input detection or deep sleep, since names vary by model and some settings affect whether the Mac keeps seeing the monitor. You can also try Stay by Cordless Dog, which has been free since version 1.5.1 and restores window positions per display setup automatically.
How does SnapState restore windows after switching the monitor back to my Mac?
Save a workspace while the monitor is on the Mac input, then arm it to restore when a monitor connects or when a matching display layout appears. When you switch back, SnapState moves the saved windows back to the monitor and remaps frames onto the current displays if needed.
What does SnapState not do here?
It cannot stop macOS from treating the monitor as disconnected; it puts windows back afterwards. SnapState restores layouts across multiple Spaces (each Space is restored when you switch to it).7 or later.