Proper window and pane navigation