From 4dfd1955375bbc977bde86504b20bd2555d5fa6e Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Mon, 6 Jun 2016 22:01:56 +0300 Subject: [PATCH] Tray Icon's Context menu flickers when there is at least one active thumbnail --- Eve-O-Preview/UI/Implementation/ThumbnailView.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Eve-O-Preview/UI/Implementation/ThumbnailView.cs b/Eve-O-Preview/UI/Implementation/ThumbnailView.cs index b66b030..ee039dd 100644 --- a/Eve-O-Preview/UI/Implementation/ThumbnailView.cs +++ b/Eve-O-Preview/UI/Implementation/ThumbnailView.cs @@ -17,6 +17,7 @@ namespace EveOPreview.UI // This is pure brainless View // Just somewhat more complex than usual private bool _isThumbnailSetUp; + private bool _isTopMost; private DWM_THUMBNAIL_PROPERTIES _Thumbnail; private IntPtr _ThumbnailHandle; private int _currentWidth; @@ -32,6 +33,7 @@ namespace EveOPreview.UI this.IsOverlayEnabled = false; this._isThumbnailSetUp = false; + this._isTopMost = false; this._currentWidth = -1; this._currentHeight = -1; @@ -74,7 +76,7 @@ namespace EveOPreview.UI { if ((value.X > 0) || (value.Y > 0)) { - this.StartPosition=FormStartPosition.Manual; + this.StartPosition = FormStartPosition.Manual; } base.Location = value; } @@ -148,7 +150,13 @@ namespace EveOPreview.UI public void SetTopMost(bool enableTopmost) { + if (this._isTopMost == enableTopmost) + { + return; + } + this.TopMost = enableTopmost; + this._isTopMost = enableTopmost; } public new void Refresh()