Skip to content

Commit

Permalink
Use screenRect.Left and screenRect.Top when checking for fullscre…
Browse files Browse the repository at this point in the history
…en boundaries (#267)
  • Loading branch information
lamrongol committed Jan 30, 2024
1 parent 9f15a7a commit eb288f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LightBulb.WindowsApi/SystemWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public bool IsFullScreen()
// Check if the window covers up screen bounds
var screenRect = Screen.FromHandle(Handle).Bounds;

return absoluteWindowClientRect.Left <= 0
&& absoluteWindowClientRect.Top <= 0
return absoluteWindowClientRect.Left <= screenRect.Left
&& absoluteWindowClientRect.Top <= screenRect.Top
&& absoluteWindowClientRect.Right >= screenRect.Right
&& absoluteWindowClientRect.Bottom >= screenRect.Bottom;
}
Expand Down

0 comments on commit eb288f6

Please sign in to comment.