2
0
mirror of synced 2025-02-20 13:38:20 +00:00

app: fix x11.go broken after cl/15460.

Fixes golang/go#12911

Note: the x11 support seems outdated in general compared to
android, darwin versions.

Change-Id: I2a80215c62b8c3cf87c5eb054184fea10819abc9
Reviewed-on: https://go-review.googlesource.com/15790
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Hyang-Ah Hana Kim 2015-10-12 16:38:36 -04:00
parent d19d328d7b
commit 5c6636dcb9

View File

@ -32,7 +32,6 @@ import (
"golang.org/x/mobile/event/size"
"golang.org/x/mobile/event/touch"
"golang.org/x/mobile/geom"
"golang.org/x/mobile/gl"
)
func init() {
@ -42,9 +41,7 @@ func init() {
func main(f func(App)) {
runtime.LockOSThread()
var worker gl.Worker
glctx, worker = gl.NewContext()
workAvailable := worker.WorkAvailable()
workAvailable := theApp.worker.WorkAvailable()
C.createWindow()
@ -71,7 +68,7 @@ func main(f func(App)) {
case <-donec:
return
case <-workAvailable:
worker.DoWork()
theApp.worker.DoWork()
case <-theApp.publish:
C.swapBuffers()
tc = ticker.C