Mac OS was doing a pretty good job of this on its own until I upgraded to Sonoma. Then, it stopped. So I tried memmon, but it doesn't seem to be working at all on Sonoma. I do notice it sometimes resizing windows in ways that are not helpful, but when i unplug my external monitor, Chrome and Safari windows that were on it move to my MacBook Pro display, and when I plug it back in, they just stay there and the external monitor remains empty.
I have the "Displays have separate spaces" pref set to false.
Mac OS was doing a pretty good job of this on its own until I upgraded to Sonoma. Then, it stopped. So I tried memmon, but it doesn't seem to be working at all on Sonoma. I do notice it sometimes resizing windows in ways that are not helpful, but when i unplug my external monitor, Chrome and Safari windows that were on it move to my MacBook Pro display, and when I plug it back in, they just stay there and the external monitor remains empty.
I have the "Displays have separate spaces" pref set to false.