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
+2 -1
View File
@@ -89,7 +89,8 @@ func NewWindow(opts *WindowOptions) *Window {
w := &Window{ w := &Window{
in: make(chan Event), in: make(chan Event),
out: make(chan Event), // Make room for buffered input events.
out: make(chan Event, 100),
ack: make(chan struct{}), ack: make(chan struct{}),
invalidates: make(chan struct{}, 1), invalidates: make(chan struct{}, 1),
frames: make(chan *ui.Ops), frames: make(chan *ui.Ops),