private void Update()
        {
            WindowPoller.Results results = poller?.Poll();

            if (results == null || results.IsDisposed)
            {
                // init and try again next time
                InitPoller();
                return;
            }

            WindowPoller.Results prev = lastPoll;
            lastPoll = results;

            IsVisible = results.IsVisible;
            Title     = results.Title;

            if (prev != null && results.IsVisible != prev.IsVisible)
            {
                RaiseVisibilityChanged(EventArgs.Empty);
            }

            if (prev != null && results.Title != prev.Title)
            {
                RaiseTitleChanged(new TitleEventArgs(prev.Title, results.Title));
            }
        }
        private void Update()
        {
            WindowPoller.Results prev    = lastPoll;
            WindowPoller.Results results = poller.Poll();
            lastPoll = results;

            IsVisible  = results.IsVisible;
            Title      = results.Title;
            IsDisposed = results.IsDisposed;

            if (prev != null && results.IsVisible != prev.IsVisible)
            {
                RaiseVisibilityChanged(EventArgs.Empty);
            }

            if (results.IsDisposed)
            {
                RaiseDisposed(EventArgs.Empty);
                isRunning = false;
                return;
            }

            if (prev != null && results.Title != prev.Title)
            {
                RaiseTitleChanged(new TitleEventArgs(prev.Title, results.Title));
            }
        }