handle docking onto a maximized container

when creating a new floating dock area by docking onto floating
container, restore the original container and maximize the newly created
dock window.