mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
ui: change events to have "Event" suffixed, not prefixed
Match the Go error naming convention (FooError). Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+3
-3
@@ -54,11 +54,11 @@ func (q *keyQueue) Frame(root *ui.Ops, events handlerEvents) {
|
||||
changed := focus != nil && focus != q.focus
|
||||
if focus != q.focus {
|
||||
if q.focus != nil {
|
||||
events[q.focus] = append(events[q.focus], key.Focus{Focus: false})
|
||||
events[q.focus] = append(events[q.focus], key.FocusEvent{Focus: false})
|
||||
}
|
||||
q.focus = focus
|
||||
if q.focus != nil {
|
||||
events[q.focus] = append(events[q.focus], key.Focus{Focus: true})
|
||||
events[q.focus] = append(events[q.focus], key.FocusEvent{Focus: true})
|
||||
}
|
||||
}
|
||||
switch {
|
||||
@@ -111,7 +111,7 @@ loop:
|
||||
h = new(keyHandler)
|
||||
q.handlers[op.Key] = h
|
||||
// Reset the handler on (each) first appearance.
|
||||
events[op.Key] = []Event{key.Focus{Focus: false}}
|
||||
events[op.Key] = []Event{key.FocusEvent{Focus: false}}
|
||||
}
|
||||
h.active = true
|
||||
case ops.TypeHideInput:
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ func (q *Queue) Add(e Event) {
|
||||
switch e := e.(type) {
|
||||
case pointer.Event:
|
||||
q.pqueue.Push(e, q.handlers)
|
||||
case key.Edit, key.Chord, key.Focus:
|
||||
case key.EditEvent, key.ChordEvent, key.FocusEvent:
|
||||
q.kqueue.Push(e, q.handlers)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user