code: def _move_focus(pymux, get_x, get_y):
      " Move focus of the active window. "
      window = pymux.arrangement.get_active_window()
  
      try:
          write_pos = pymux.get_client_state().layout_manager.pane_write_positions[window.active_pane]
      except KeyError:
          pass
      else:
          x = get_x(write_pos)
          y = get_y(write_pos)
  
          # Look for the pane at this position.
          for pane, wp in pymux.get_client_state().layout_manager.pane_write_positions.items():
              if (wp.xpos <= x < wp.xpos + wp.width and
                      wp.ypos <= y < wp.ypos + wp.height):
                  window.active_pane = pane
                  returf _move_focus(pymux, get_x, get_y):
      " Move focus of the active window. "
      window = pymux.arrangement.get_active_window()
  
      try:
          write_pos = pymux.get_client_state().layout_manager.pane_write_positions[window.active_pane]
      except KeyError:
          pass
      else:
          x = get_x(write_pos)
          y = get_y(write_pos)
  
          # Look for the pane at this position.
          for pane, wp in pymux.get_client_state().layout_manager.pane_write_positions.items():
              if (wp.xpos <= x < wp.xpos + wp.width and
                      wp.ypos <= y < wp.ypos + wp.height):
                  window.active_pane = pane
                  return
docs: Move focus of the active window.