From 35e4a9db01f82391dd752805ba54690980cb3940 Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Sat, 6 Aug 2016 13:41:34 +0300 Subject: [PATCH] Tray Icon menu disappears when there is at least one thumbnail visible --- Eve-O-Preview/UI/Implementation/ThumbnailView.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Eve-O-Preview/UI/Implementation/ThumbnailView.cs b/Eve-O-Preview/UI/Implementation/ThumbnailView.cs index 5a99a01..2e252f2 100644 --- a/Eve-O-Preview/UI/Implementation/ThumbnailView.cs +++ b/Eve-O-Preview/UI/Implementation/ThumbnailView.cs @@ -16,6 +16,7 @@ namespace EveOPreview.UI // Just somewhat more complex than usual private bool _isThumbnailSetUp; private bool _isOverlayVisible; + private bool _isTopMost; private bool _isPositionChanged; private bool _isSizeChanged; private DateTime _suppressResizeEventsTimestamp; @@ -34,6 +35,7 @@ namespace EveOPreview.UI this.IsOverlayEnabled = false; this._isThumbnailSetUp = false; this._isOverlayVisible = false; + this._isTopMost = false; this._isPositionChanged = true; this._isSizeChanged = true; @@ -162,8 +164,16 @@ namespace EveOPreview.UI public void SetTopMost(bool enableTopmost) { + // IMO WinForms could check this too + if (this._isTopMost == enableTopmost) + { + return; + } + this.TopMost = enableTopmost; this._overlay.TopMost = enableTopmost; + + this._isTopMost = enableTopmost; } public void ZoomIn(ViewZoomAnchor anchor, int zoomFactor)