From 56e216a430694d86c242df763484deba682f3302 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 15 Apr 2017 20:21:11 -0400 Subject: Hide AL when clicking on window ctrls --- ShiftOS.WinForms/WindowBorder.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ShiftOS.WinForms/WindowBorder.cs') diff --git a/ShiftOS.WinForms/WindowBorder.cs b/ShiftOS.WinForms/WindowBorder.cs index e809f90..64f2da4 100644 --- a/ShiftOS.WinForms/WindowBorder.cs +++ b/ShiftOS.WinForms/WindowBorder.cs @@ -92,6 +92,16 @@ namespace ShiftOS.WinForms lbtitletext.Text = title; } + public void SetupControls(Control ctrl) + { + foreach (Control c in ctrl.Controls) + SetupControls(c); + ctrl.Click += (o, a) => + { + Desktop.HideAppLauncher(); + }; + } + /// /// Initializes a new instance of the class. /// @@ -127,6 +137,8 @@ namespace ShiftOS.WinForms this.Width = LoadedSkin.LeftBorderWidth + _parentWindow.Width + LoadedSkin.RightBorderWidth; this.Height = LoadedSkin.TitlebarHeight + _parentWindow.Height + LoadedSkin.BottomBorderWidth; + SetupControls(this); + this.pnlcontents.Controls.Add(this._parentWindow); this._parentWindow.Dock = DockStyle.Fill; this._parentWindow.Show(); -- cgit v1.2.3