Skip to content

Commit

Permalink
Allow window to be switched behind other windows while staying fullsc…
Browse files Browse the repository at this point in the history
…reen (#12)
  • Loading branch information
aidy-jenkins authored Jun 24, 2022
1 parent 4992751 commit 34408f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions WebVideoGamepad.NET/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 34408f1

Please sign in to comment.