Figured out why I'm getting intermittent crashes. Worked around for now, but will become a major issue soon...

This commit is contained in:
Pietro Gagliardi 2014-08-13 09:57:22 -04:00
parent e28b791489
commit 59f2eeca22
2 changed files with 7 additions and 3 deletions

View File

@ -39,11 +39,11 @@ Stack, Grid
method calls should trigger re-layout of windows
default buttons
figure out how they interact with Areas (especially on GTK+, where GtkEntry somehow has special handling for this)
in general
new moving stack and future moving heap make package ui a pain in general
so I don't forget, some TODOs:
windows
- backgrounds are not transparent
mac os x
- applicationShouldTerminate: not handled
general
- changing tabs from a tab with an area seems to be broken now...??

View File

@ -146,12 +146,16 @@ func (tw *testwin) make(done chan struct{}) {
}
}
// this must be on the heap thanks to moving stacks
// soon even this won't be enough...
var tw *testwin
// because Cocoa hates being run off the main thread, even if it's run exclusively off the main thread
func init() {
flag.BoolVar(&spaced, "spaced", false, "enable spacing")
flag.Parse()
go func() {
tw := new(testwin)
tw = new(testwin)
done := make(chan struct{})
Do(func() { tw.make(done) })
<-done