Skip to content

Commit 75b7480

Browse files
committed
minor tweak
1 parent bfa3b09 commit 75b7480

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

FlashpointSecurePlayer/WebBrowserMode.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,17 @@ private bool ExitFullscreenLabelTimer {
8484
}
8585

8686
private bool fullscreen = false;
87-
private Point fullscreenLocation;
88-
private Size fullscreenSize;
8987
private FormBorderStyle fullscreenFormBorderStyle = FormBorderStyle.Sizable;
9088
private FormWindowState fullscreenWindowState = FormWindowState.Maximized;
89+
private Point fullscreenLocation;
90+
private Size fullscreenSize;
9191

9292
private Point closableWebBrowserLocation;
9393
private Size closableWebBrowserSize;
9494

95+
// be very careful modifying this property
96+
// it is very picky about the order things happen
97+
// and likes to cause bugs if you're not careful changing it
9598
public bool Fullscreen {
9699
get {
97100
return fullscreen;
@@ -110,10 +113,10 @@ public bool Fullscreen {
110113

111114
if (fullscreen) {
112115
// get the original properties before modifying them
113-
fullscreenLocation = Location;
114-
fullscreenSize = Size;
115116
fullscreenFormBorderStyle = FormBorderStyle;
116117
fullscreenWindowState = WindowState;
118+
fullscreenLocation = Location;
119+
fullscreenSize = Size;
117120

118121
closableWebBrowserLocation = closableWebBrowser.Location;
119122
closableWebBrowserSize = closableWebBrowser.Size;

0 commit comments

Comments
 (0)