Share one monitor between a Mac and another computer without rebuilding your Mac layout every time you switch back.
A common desk setup is one good monitor shared between a Mac and a work laptop or PC, switched with the monitor input button or a KVM. Switch the monitor over to the other computer and your Mac windows move to the laptop screen. Switch back and they stay there, so you spend a minute dragging everything back to the big display. People describe it with LG monitors and many other brands, because it generally comes from how macOS handles a monitor that goes away rather than from one monitor model.
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 switching inputs moves your Mac windows
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.
Free and manual workarounds
- 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 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 SnapState restores your layout, step by step
- 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 the visible windows on the current desktop with position and size, the apps needed to relaunch them, the monitor and display layout, and the active tab URL 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.
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.5.2 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/.
Honest limitations
SnapState does not change how your monitor or macOS handles the input switch; it restores your layout afterwards. It saves only the visible windows on the current desktop, so it does not save or restore macOS Spaces. Firefox is not supported, only the active tab URL per supported browser window is restored, and it is not a tiling or snapping window manager. It requires macOS 15.7 or later.
Common questions
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. It restores only the visible windows on the current desktop, does not save or restore macOS Spaces, does not support Firefox, restores only the active tab URL per supported browser window, and requires macOS 15.7 or later.