Window resizing and disconnecting