mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
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:
+3
-2
@@ -88,8 +88,9 @@ 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),
|
||||||
|
|||||||
Reference in New Issue
Block a user