def _move_focus(pymux, get_x, get_y):
window = pymux.arrangement.get_active_window()<EOL>try:<EOL><INDENT>write_pos = pymux.get_client_state().layout_manager.pane_write_positions[window.active_pane]<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>x = get_x(write_pos)<EOL>y = get_y(write_pos)<EOL>for pane, wp in pymux.get_client_state().layout_manager.pane_write_positions.items():<EOL><INDENT>if (wp.xpos <= x < wp.xpos + wp.width and<EOL>wp.ypos <= y < wp.ypos + wp.height):<EOL><INDENT>window.active_pane = pane<EOL>return<EOL><DEDENT><DEDENT><DEDENT>
Move focus of the active window.