Skip to content

Commit

Permalink
Update FixedSize window size if min is bigger
Browse files Browse the repository at this point in the history
Fixes #2800
  • Loading branch information
andydotxyz committed Mar 14, 2022
1 parent ed8d41a commit e58e527
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/driver/glfw/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,12 @@ func (w *window) fitContent() {
w.viewLock.Unlock()
}
if w.fixedSize {
w.shouldWidth, w.shouldHeight = w.requestedWidth, w.requestedHeight
if w.shouldWidth > w.requestedWidth {
w.requestedWidth = w.shouldWidth
}
if w.shouldHeight > w.requestedHeight {
w.requestedHeight = w.shouldHeight
}
view.SetSizeLimits(w.requestedWidth, w.requestedHeight, w.requestedWidth, w.requestedHeight)
} else {
view.SetSizeLimits(minWidth, minHeight, glfw.DontCare, glfw.DontCare)
Expand Down

0 comments on commit e58e527

Please sign in to comment.