From f71564172d7b70b2e02cc05c861fd141aa8792f6 Mon Sep 17 00:00:00 2001 From: Jeremy Tellier - ROG Date: Tue, 20 Oct 2020 16:25:07 +0100 Subject: [PATCH] Fix the hide on deactivation when not attached. --- DesktopEdge/MainWindow.xaml.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DesktopEdge/MainWindow.xaml.cs b/DesktopEdge/MainWindow.xaml.cs index ec61e71c..7528db6c 100644 --- a/DesktopEdge/MainWindow.xaml.cs +++ b/DesktopEdge/MainWindow.xaml.cs @@ -74,11 +74,13 @@ namespace ZitiDesktopEdge { } private void MainWindow_Deactivated(object sender, EventArgs e) { + if (this._isAttached) { #if DEBUG Debug.WriteLine("debug is enabled - windows pinned"); #else this.Visibility = Visibility.Collapsed; #endif + } } private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { @@ -528,7 +530,7 @@ namespace ZitiDesktopEdge { } private void MainUI_Deactivated(object sender, EventArgs e) { - if (UIModel.HideOnLostFocus) { + if (this._isAttached) { #if DEBUG Debug.WriteLine("debug is enabled - windows pinned"); #else