Skip to content

Commit

Permalink
Merge branch 'develop' into feature/package
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jan 15, 2019
2 parents 034e461 + b68bd7d commit 79a0635
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package app // import "fyne.io/fyne/app"

import (
"os"
"sync"

"fyne.io/fyne"
"fyne.io/fyne/theme"
Expand All @@ -17,6 +18,7 @@ type fyneApp struct {

settings fyne.Settings
running bool
runMutex sync.Mutex
}

func (app *fyneApp) Icon() fyne.Resource {
Expand All @@ -32,11 +34,16 @@ func (app *fyneApp) NewWindow(title string) fyne.Window {
}

func (app *fyneApp) Run() {
app.runMutex.Lock()

if app.running {
app.runMutex.Unlock()
return
}

app.running = true
app.runMutex.Unlock()

app.driver.Run()
}

Expand Down

0 comments on commit 79a0635

Please sign in to comment.