From 34408f18fad72631c15e9aac16c8331143fcfa98 Mon Sep 17 00:00:00 2001 From: Aidy Jenkins Date: Fri, 24 Jun 2022 20:35:35 +0100 Subject: [PATCH] Allow window to be switched behind other windows while staying fullscreen (#12) --- WebVideoGamepad.NET/Form1.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WebVideoGamepad.NET/Form1.cs b/WebVideoGamepad.NET/Form1.cs index 8fa12f7..94b2103 100644 --- a/WebVideoGamepad.NET/Form1.cs +++ b/WebVideoGamepad.NET/Form1.cs @@ -22,6 +22,10 @@ private void Form1_Load(object sender, EventArgs e) var frameConfig = Config.Instance.Frame; if (frameConfig.Fullscreen) { + this.Deactivate += (o, e) => this.TopMost = false; + this.Activated += (o, e) => this.TopMost = true; + + this.Focus(); this.TopMost = true; this.FormBorderStyle = FormBorderStyle.None; this.WindowState = FormWindowState.Maximized;