aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/WindowBorder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.WinForms/WindowBorder.cs')
-rw-r--r--ShiftOS.WinForms/WindowBorder.cs12
1 files changed, 12 insertions, 0 deletions
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();
+ };
+ }
+
/// <summary>
/// Initializes a new instance of the <see cref="ShiftOS.WinForms.WindowBorder"/> class.
/// </summary>
@@ -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();