'Active Client Highlight' frame is displayed with noticeable delay

This commit is contained in:
Anton Kasyanov
2018-04-04 01:05:54 +03:00
parent c9121873b5
commit 9b9a006dcb
2 changed files with 13 additions and 5 deletions

View File

@@ -383,11 +383,20 @@ namespace EveOPreview.Services
private void ThumbnailActivated(IntPtr id) private void ThumbnailActivated(IntPtr id)
{ {
// View is always available because this method is actually being called by
// a view callback
IThumbnailView view = this._thumbnailViews[id]; IThumbnailView view = this._thumbnailViews[id];
Task.Run(() => this._windowManager.ActivateWindow(view.Id)); Task.Run(() =>
{
this._windowManager.ActivateWindow(view.Id);
})
.ConfigureAwait(true)
.GetAwaiter()
.OnCompleted(() =>
{
this.SwitchActiveClient(view.Id, view.Title);
this.UpdateClientLayouts();
this.RefreshThumbnails();
});
this.UpdateClientLayouts(); this.UpdateClientLayouts();
} }

View File

@@ -116,8 +116,7 @@ namespace EveOPreview.View
this._isSizeChanged = true; this._isSizeChanged = true;
this._isOverlayVisible = false; this._isOverlayVisible = false;
// Thumbnail will be properly registered during the Manager's Refresh cycle this.Refresh(true);
this.Refresh();
this.IsActive = true; this.IsActive = true;
} }