It sounds like you want to "dock" your window.
There is a little curly arrow in the top right hand corner of each window (pointing to the right and down when the window is floating, if I recall correctly). If I understand your question correctly, that would solve it for you..