Skip to content

Commit

Permalink
Merge branch 'develop' into staticcheck-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jun 25, 2020
2 parents 103a1bd + 33c346c commit 6acbcd1
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions internal/driver/glfw/window.go
Expand Up @@ -327,6 +327,11 @@ func (w *window) Show() {
}

func (w *window) doShow() {
if w.view() != nil {
w.doShowAgain()
return
}

for !running() {
time.Sleep(time.Millisecond * 10)
}
Expand Down Expand Up @@ -1173,6 +1178,25 @@ func (w *window) create() {
})
}

func (w *window) doShowAgain() {
if w.viewport == nil {
return
}

runOnMain(func() {
// show top canvas element
if w.canvas.Content() != nil {
w.canvas.Content().Show()
}

w.viewport.SetPos(w.xpos, w.ypos)
w.viewport.Show()
w.viewLock.Lock()
w.visible = true
w.viewLock.Unlock()
})
}

func (w *window) view() *glfw.Window {
w.viewLock.RLock()
defer w.viewLock.RUnlock()
Expand Down

0 comments on commit 6acbcd1

Please sign in to comment.