window.go
func (w *Window) focusWidget() {
	setCursor(-1, -1) // hide
	if w.focus < 0 {
		for i, widget := range w.widgets {
			if widget.CanFocus() {
				w.focus = i
				widget.Focus()
				return
			}
		}
		// nothing to do
		return
	}

	// make sure we are in bounds
	if w.focus > len(w.widgets) {
		// this really should not happen
		return
	}

	w.widgets[w.focus].Focus()
}
func (w *Window) focusWidget() {
	setCursor(-1, -1) // hide
	if w.focus < 0 {
		for i, widget := range w.widgets {
			if widget.CanFocus() {
				w.focus = i
				widget.Focus()
				return
			}
		}
		// nothing to do
		return
	}

	// make sure we are in bounds
	if w.focus > len(w.widgets) {
		// this really should not happen
		return
	}

	w.widgets[w.focus].Focus()
}
// focusWidget focuses on the current widget.  If focus is -1 it'll focus on
// the first available widget.
// focusWidget shall be called from queue context.