diff --git a/src/Eto.Wpf/Forms/FloatingFormHandler.cs b/src/Eto.Wpf/Forms/FloatingFormHandler.cs index d58039324..21fcf7ebb 100755 --- a/src/Eto.Wpf/Forms/FloatingFormHandler.cs +++ b/src/Eto.Wpf/Forms/FloatingFormHandler.cs @@ -32,7 +32,7 @@ public override void OnUnLoad(EventArgs e) private void Application_IsActiveChanged(object sender, EventArgs e) { - SetVisibility(); + SetVisibility(true); } public override bool Visible @@ -41,7 +41,7 @@ public override bool Visible set { Widget.Properties.Set(Visible_Key, value, true); - SetVisibility(); + SetVisibility(false); } } @@ -51,7 +51,7 @@ public override void Show() base.Show(); } - void SetVisibility() + void SetVisibility(bool setActive) { var currentlyVisible = base.Visible; var isVisible = Application.Instance.IsActive && Visible; @@ -66,13 +66,15 @@ void SetVisibility() } base.Visible = isVisible; } - else + else if (setActive) { var oldShowActivated = Control.ShowActivated; Control.ShowActivated = _wasActive; base.Visible = isVisible; Control.ShowActivated = oldShowActivated; } + else + base.Visible = isVisible; } } } \ No newline at end of file