My Emacs frame looks like this:
+---------------------------+ | | | | | | | | B | |
You could use winner-mode to be able to undo the changes to be the window sizes.
You could also explicitly save and restore the window configuration in registers.