mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
ui/input: change Queue to return Events one at a time
By returning all events, widgets that might return early from its
event loop might throw away subsequent events. Instead of requiring
those widgets to store the event list, convert input.Queue to step
through the available events one at a time.
Functional revert of 1735d5ced8.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -113,7 +113,7 @@ func (e *Editor) Next(cfg ui.Config, queue input.Queue) (EditorEvent, bool) {
|
||||
if (sdist > 0 && soff >= smax) || (sdist < 0 && soff <= smin) {
|
||||
e.scroller.Stop()
|
||||
}
|
||||
for _, ke := range queue.Events(e) {
|
||||
for ke, ok := queue.Next(e); ok; ke, ok = queue.Next(e) {
|
||||
e.blinkStart = cfg.Now()
|
||||
switch ke := ke.(type) {
|
||||
case key.FocusEvent:
|
||||
|
||||
Reference in New Issue
Block a user