aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorId405 <8o7wermobile@gmail.com>2019-05-10 21:05:39 -0800
committerGitHub <noreply@github.com>2019-05-10 21:05:39 -0800
commitee835029b4c84dfb868dc70b4e31003dec0033f2 (patch)
treeb00a24d62847fa991e524d1f6476c766cd523f3e
parent750e8c7d3cd011f298c528c81efe63b1dd53ec90 (diff)
downloadgui-ee835029b4c84dfb868dc70b4e31003dec0033f2.zip
Update win.go
-rw-r--r--win/win.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/win/win.go b/win/win.go
index ef6c832..3a06ea9 100644
--- a/win/win.go
+++ b/win/win.go
@@ -143,12 +143,12 @@ func makeGLFWWin(o *options) (*glfw.Window, error) {
glfw.WindowHint(glfw.Maximized, glfw.True)
}
w, err := glfw.CreateWindow(o.width, o.height, o.title, nil, nil)
- if o.maximized {
- o.width, o.height = w.GetFramebufferSize() // set o.width and o.height to the window size due to the window being maximized
- }
if err != nil {
return nil, err
}
+ if o.maximized {
+ o.width, o.height = w.GetFramebufferSize() // set o.width and o.height to the window size due to the window being maximized
+ }
return w, nil
}