Right-click on the dividing line between windows to bring up a popup menu with the option to ‘join,’ then choose which way the window will overwrite the one you want to close with the pointer.