Hi, Johannes.
Thanks for the feedback. I'm glad to hear that you're using the code and that it's working well.
I like the idea of a window swap. I agree it would be nice (and faster) as a separate feature, and I'm starting to get good at this. ;-) So I'll do it.
My next rp project, though, is the very big frame affinity feature -- making windows want to reappear in the frame where they were last seen. This is one that is really annoying me now, so it will be good to get it done!
It's interesting that a side-effect is how to handle undo. Currently undo acts only on frames, but because frames don't care much what windows they display, we don't need to remember anything about windows for undo. With frame affinity, however, removing a frame does something to the windows that were displayed in the frame. (Probably inserts them into the frame that absorbed the pixels.) So undo should probably move the windows back to the frame that was just undeleted. But then, suddenly, other window actions should be undoable. (Closing a window seems an exception, since it isn't very meaningful and could even be dangerous if the process actually did something serious.)
Ratpoison might be the only window manager that supports undo well, so we might be in interesting creative territory. If anyone knows prior art, please let me know.