From 1db8c4a00d102c5a184f9e4da29e3051a67a756b Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 15 Apr 2017 20:25:05 -0400 Subject: [PATCH] Hide AL when desktop items are clicked --- ShiftOS.WinForms/WinformsDesktop.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs index d50be53..cd74a6b 100644 --- a/ShiftOS.WinForms/WinformsDesktop.cs +++ b/ShiftOS.WinForms/WinformsDesktop.cs @@ -58,6 +58,11 @@ namespace ShiftOS.WinForms public WinformsDesktop() { InitializeComponent(); + this.Click += (o, a) => + { + HideAppLauncher(); + }; + SetupControl(desktoppanel); Shiftorium.Installed += () => { //Only if the DevX Legions story hasn't been experienced yet. @@ -284,6 +289,7 @@ namespace ShiftOS.WinForms form.BringToFront(); focused = form; } + HideAppLauncher(); }; var pnlbtn = new Panel(); @@ -826,6 +832,13 @@ namespace ShiftOS.WinForms { } + public void SetupControl(Control ctrl) + { + foreach (Control c in ctrl.Controls) + SetupControl(c); + ctrl.Click += (o, a) => HideAppLauncher(); + } + private void apps_Click(object sender, EventArgs e) { if (Shiftorium.UpgradeInstalled("advanced_app_launcher"))