protected override bool OnFocused(DirectionType direction) { // If there's an overlay widget, that's all we can focus if (overlayWidget != null && overlayWidget.Visible) { overlayWidget.ChildFocus(direction); return(true); } return(base.OnFocused(direction)); }
internal static void SetFocus (Widget w) { w.ChildFocus (DirectionType.Down); Window win = w.Toplevel as Gtk.Window; if (win == null) return; // Make sure focus is not given to internal children if (win.Focus != null) { Container c = win.Focus.Parent as Container; if (c.Children.Length == 0) win.Focus = c; } }