~eliasnaur/gio

f5985b5e7dea0446a3d094de47fade8aa31872ef — Elias Naur 1 year, 4 months ago 6a9a870
cmd,example: bump gio version

Add os.Exit to examples now that app.Main never returns.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
M cmd/go.mod => cmd/go.mod +1 -1
@@ 3,7 3,7 @@ module gioui.org/cmd
go 1.13

require (
	gioui.org v0.0.0-20200626151441-31e8339e1bf8
	gioui.org v0.0.0-20200626142042-6a9a87046221
	github.com/chromedp/cdproto v0.0.0-20191114225735-6626966fbae4
	github.com/chromedp/chromedp v0.5.2
	golang.org/x/image v0.0.0-20200618115811-c13761719519

M cmd/go.sum => cmd/go.sum +2 -2
@@ 1,6 1,6 @@
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gioui.org v0.0.0-20200626151441-31e8339e1bf8 h1:dpk8+m+WuLrLoYBsSdwPvj03AwXuP5wDZXlCW+AL0I4=
gioui.org v0.0.0-20200626151441-31e8339e1bf8/go.mod h1:jiUwifN9cRl/zmco43aAqh0aV+s9GbhG13KcD+gEpkU=
gioui.org v0.0.0-20200626142042-6a9a87046221 h1:E3YNhsdzdBYXX3ewLaOnQsDDPsTnsohh40JX+1jwXfY=
gioui.org v0.0.0-20200626142042-6a9a87046221/go.mod h1:jiUwifN9cRl/zmco43aAqh0aV+s9GbhG13KcD+gEpkU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/chromedp/cdproto v0.0.0-20191114225735-6626966fbae4 h1:QD3KxSJ59L2lxG6MXBjNHxiQO2RmxTQ3XcK+wO44WOg=

M example/go.mod => example/go.mod +1 -1
@@ 3,7 3,7 @@ module gioui.org/example
go 1.13

require (
	gioui.org v0.0.0-20200626151441-31e8339e1bf8
	gioui.org v0.0.0-20200626142042-6a9a87046221
	github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7
	github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72
	github.com/google/go-github/v24 v24.0.1

M example/go.sum => example/go.sum +2 -2
@@ 1,7 1,7 @@
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gioui.org v0.0.0-20200626151441-31e8339e1bf8 h1:dpk8+m+WuLrLoYBsSdwPvj03AwXuP5wDZXlCW+AL0I4=
gioui.org v0.0.0-20200626151441-31e8339e1bf8/go.mod h1:jiUwifN9cRl/zmco43aAqh0aV+s9GbhG13KcD+gEpkU=
gioui.org v0.0.0-20200626142042-6a9a87046221 h1:E3YNhsdzdBYXX3ewLaOnQsDDPsTnsohh40JX+1jwXfY=
gioui.org v0.0.0-20200626142042-6a9a87046221/go.mod h1:jiUwifN9cRl/zmco43aAqh0aV+s9GbhG13KcD+gEpkU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7 h1:SCYMcCJ89LjRGwEa0tRluNRiMjZHalQZrVrvTbPh+qw=
github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7/go.mod h1:482civXOzJJCPzJ4ZOX/pwvXBWSnzD4OKMdH4ClKGbk=

M example/gophers/main.go => example/gophers/main.go +1 -0
@@ 60,6 60,7 @@ func main() {
			app.Size(unit.Dp(400), unit.Dp(800)),
			app.Title("Gophers"),
		)
		defer os.Exit(0)
		if err := newApp(w).run(); err != nil {
			log.Fatal(err)
		}

M example/hello/hello.go => example/hello/hello.go +2 -0
@@ 7,6 7,7 @@ package main
import (
	"image/color"
	"log"
	"os"

	"gioui.org/app"
	"gioui.org/io/system"


@@ 20,6 21,7 @@ import (

func main() {
	go func() {
		defer os.Exit(0)
		w := app.NewWindow()
		if err := loop(w); err != nil {
			log.Fatal(err)

M example/kitchen/kitchen.go => example/kitchen/kitchen.go +1 -0
@@ 68,6 68,7 @@ func main() {
	}()

	go func() {
		defer os.Exit(0)
		w := app.NewWindow(app.Size(unit.Dp(800), unit.Dp(700)))
		if err := loop(w); err != nil {
			log.Fatal(err)

M example/tabs/tabs.go => example/tabs/tabs.go +2 -0
@@ 8,6 8,7 @@ import (
	"image/color"
	"log"
	"math"
	"os"

	"gioui.org/app"
	"gioui.org/f32"


@@ 24,6 25,7 @@ import (

func main() {
	go func() {
		defer os.Exit(0)
		w := app.NewWindow()
		if err := loop(w); err != nil {
			log.Fatal(err)

M example/windows/windows.go => example/windows/windows.go +8 -0
@@ 6,6 6,8 @@ package main

import (
	"log"
	"os"
	"sync/atomic"

	"gioui.org/app"
	"gioui.org/io/event"


@@ 31,13 33,19 @@ func main() {
	app.Main()
}

var windowCount int32

func newWindow() {
	atomic.AddInt32(&windowCount, +1)
	go func() {
		w := new(window)
		w.Window = app.NewWindow()
		if err := w.loop(w.Events()); err != nil {
			log.Fatal(err)
		}
		if c := atomic.AddInt32(&windowCount, -1); c == 0 {
			os.Exit(0)
		}
	}()
}