Command to collect windows of one or all apps in one monitor? My setup allows my laptop and desk machine to share a large-screen monitor in addition to their own displays. Both machines are connected to the large monitor with their own HDMI cables, and that monitor has a switch for choosing which one to display. All good.

Sometimes I have the large monitor showing one machine's stuff and I need to check something on the other machine -- and as it happens the app on that machine has its windows open on the large screen, so I don't see them. Rather than switching the large monitor to the other machine, is there some command to make the second machine collect that app's (or all apps') windows into its own display?

The only way I've found that works is to pull the HDMI cable out of the second machine, which forces all of its open windows back into its own display. I'd prefer a way that doesn't involve connecting and disconnecting the cable. System Settings -> Displays is no help.

Machines are late-2008 MBP and mid-2010 Mac Mini Server. Running Lion on both.

Thanks.
You can use a third party window manager like Stay to assign windows to the display where you'd like them to reside. By using Stay to restore windows, all of them move to their designated spot. For example, you could set your windows to the display that you're currently viewing.