mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
io/input: improve documentation, code
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+5
-5
@@ -313,15 +313,15 @@ func (q *Router) collapseState(idx int) {
|
|||||||
}
|
}
|
||||||
first := &q.changes[0]
|
first := &q.changes[0]
|
||||||
first.state = q.changes[idx].state
|
first.state = q.changes[idx].state
|
||||||
for i := 1; i <= idx; i++ {
|
for _, ch := range q.changes[1 : idx+1] {
|
||||||
first.events = append(first.events, q.changes[i].events...)
|
first.events = append(first.events, ch.events...)
|
||||||
}
|
}
|
||||||
q.changes = append(q.changes[:1], q.changes[idx+1:]...)
|
q.changes = append(q.changes[:1], q.changes[idx+1:]...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Frame replaces the declared handlers from the supplied
|
// Frame completes the current frame and starts a new with the
|
||||||
// operation list. The text input state, wakeup time and whether
|
// handlers from the frame argument. Remaining events are discarded,
|
||||||
// there are active profile handlers is also saved.
|
// unless they were deferred by a command.
|
||||||
func (q *Router) Frame(frame *op.Ops) {
|
func (q *Router) Frame(frame *op.Ops) {
|
||||||
var remaining []event.Event
|
var remaining []event.Event
|
||||||
if n := len(q.changes); n > 0 {
|
if n := len(q.changes); n > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user