SendActiveStateChange() private method

private SendActiveStateChange ( ) : void
return void
示例#1
0
        protected void NotifyFocused(bool focused)
        {
            Window focusWindow = null;

            // FIXME: Gail sends the events in a slighly different order:
            // window:activate , object:state-changed:focused, object:state-changed:active
            if (focused)
            {
                Atk.Object container = Parent;
                while (container != null)
                {
                    if (container is Window)
                    {
                        focusWindow = (Window)container;
                        TopLevelRootItem.Instance.CheckAndHandleNewActiveWindow(focusWindow);
                        break;
                    }
                    else if (container is Adapter)
                    {
                        focusWindow = ((Adapter)container).PrivateWindow;
                        if (focusWindow != null)
                        {
                            break;
                        }
                    }
                    container = container.Parent;
                }

                NotifyStateChange(Atk.StateType.Focused, focused);
            }

            if (focused)
            {
                GLib.Timeout.Add(0, new GLib.TimeoutHandler(delegate {
                    Atk.Focus.TrackerNotify(this);
                    return(false);
                }));
            }
            if (focusWindow != null)
            {
                focusWindow.SendActiveStateChange();
            }
        }