Fix the bug when the application became unresponsible when minimizing (#133)

This commit is contained in:
Max Risuhin 2019-01-09 01:11:06 +02:00 committed by GitHub
parent 10a962746f
commit ab80fcd44e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -149,6 +149,10 @@ func (gui *GUI) scale() float32 {
// can only be called on OS thread
func (gui *GUI) resize(w *glfw.Window, width int, height int) {
if gui.window.GetAttrib(glfw.Iconified) != 0 {
return
}
gui.resizeLock.Lock()
defer gui.resizeLock.Unlock()