diff --git a/glfw.go b/glfw.go index c5829aa..eb579e8 100644 --- a/glfw.go +++ b/glfw.go @@ -148,15 +148,15 @@ func glInit() { qml.Func1 = func() int { if !win.ShouldClose() { - glfw.PollEvents() + //glfw.PollEvents() drawSlide() win.SwapBuffers() return 0 } win.Hide() - win.Destroy() - glfw.Terminate() + //win.Destroy() + //glfw.Terminate() return 1 } diff --git a/main.go b/main.go index 766cf5e..dbf7b1c 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "path/filepath" "github.com/kardianos/osext" + "github.com/go-gl/glfw/v3.1/glfw" "github.com/lordwelch/qml" "gopkg.in/gographics/imagick.v2/imagick" ) @@ -35,6 +36,9 @@ func main() { fmt.Fprintf(os.Stderr, "error: %v\n", err) os.Exit(1) } + win.Destroy() + glfw.PollEvents() + glfw.Terminate() }