summaryrefslogtreecommitdiffstats
path: root/lib/ui/grid.go
Commit message (Collapse)AuthorAgeFilesLines
* lib/ui: introduce InvalidatableSimon Ser2019-04-271-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many Drawable implementations have their own Invalidate and OnInvalidate functions, with an unexported onInvalidate field. However OnInvalidate and Invalidate are usually not called in the same goroutine. This results in a race on this field, e.g.: Read at 0x00c000094748 by goroutine 7: git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList.func1() /home/simon/src/aerc2/widgets/dirlist.go:85 +0x56 git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1() /home/simon/src/aerc2/widgets/spinner.go:93 +0x1bb Previous write at 0x00c000094748 by main goroutine: [failed to restore the stack] Goroutine 7 (running) created at: git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start() /home/simon/src/aerc2/widgets/spinner.go:46 +0x8f git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList() /home/simon/src/aerc2/widgets/dirlist.go:37 +0x286 git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView() /home/simon/src/aerc2/widgets/account.go:50 +0x5ca git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc() /home/simon/src/aerc2/widgets/aerc.go:60 +0x800 main.main() /home/simon/src/aerc2/aerc.go:65 +0x33e To fix this, introduce a new type, Invalidatable, which protects the field. Unfortunately the Drawable must be passed to the callback function in Invalidate, so we still need to re-implement this in each Invalidatable user.
* Implement the Container interface in lib/ui/Drew DeVault2019-01-201-0/+8
|
* Revert "Add abstract list, update dirlist accordingly"Drew DeVault2019-01-131-1/+0
| | | | This reverts commit 3157897c1a20e5638feaf56e753b7886bc4ba267.
* Add abstract list, update dirlist accordinglyDrew DeVault2019-01-131-0/+1
|
* Add stack UI containerDrew DeVault2018-02-271-7/+7
|
* Split UI library and widgetsDrew DeVault2018-02-261-0/+191