Exemple #1
0
        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));
        }
Exemple #2
0
		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;
			}
		}