Allow switching windows when current window is closed

Signed-off-by: Jari Bakken <jari.bakken@gmail.com>