ui/app: make window event queue buffered

Input events are asynchronous, so add buffered to the event queue
so that a slow client does not stall the native window.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-07-21 12:43:42 +02:00
parent 5f0047567e
commit 7582b835bc
+3 -2
View File
@@ -88,8 +88,9 @@ func NewWindow(opts *WindowOptions) *Window {
}
w := &Window{
in: make(chan Event),
out: make(chan Event),
in: make(chan Event),
// Make room for buffered input events.
out: make(chan Event, 100),
ack: make(chan struct{}),
invalidates: make(chan struct{}, 1),
frames: make(chan *ui.Ops),