ui/gesture: replace Click.Events with Click.Next

Everything else was converted to use the Next
style event API, but Click was forgotten.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-08-22 17:16:06 +02:00
parent 9520a9278f
commit a6483a421f
2 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ func (e *Editor) Next(cfg ui.Config, queue input.Queue) (EditorEvent, bool) {
e.scrollOff.Y += sdist
soff = e.scrollOff.Y
}
for _, evt := range e.clicker.Events(queue) {
for evt, ok := e.clicker.Next(queue); ok; evt, ok = e.clicker.Next(queue) {
switch {
case evt.Type == gesture.TypePress && evt.Source == pointer.Mouse,
evt.Type == gesture.TypeClick && evt.Source == pointer.Touch: