mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
ui/input: change Events to return all events at once
Single stepping events only makes sense for widgets with complex state, e.g. the text.Editor. For the input.Events source, returning all events in a single Events call is sufficient and more natural for clients. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-5
@@ -119,11 +119,7 @@ func (e *Editor) Next() (EditorEvent, bool) {
|
||||
if (sdist > 0 && soff >= smax) || (sdist < 0 && soff <= smin) {
|
||||
e.scroller.Stop()
|
||||
}
|
||||
for {
|
||||
ke, ok := e.Inputs.Next(e)
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
for _, ke := range e.Inputs.Events(e) {
|
||||
e.blinkStart = e.Config.Now()
|
||||
switch ke := ke.(type) {
|
||||
case key.FocusEvent:
|
||||
|
||||
Reference in New Issue
Block a user