ui/gesture: convert Click to single step events for symmetry

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-06-22 17:33:29 +02:00
parent b94119d093
commit bebfd822d8
2 changed files with 12 additions and 8 deletions
+5 -1
View File
@@ -90,7 +90,11 @@ func (e *Editor) Next() (EditorEvent, bool) {
soff = e.scrollOff.Y
}
scrollTo := false
for _, evt := range e.clicker.Update(e.Inputs) {
for {
evt, ok := e.clicker.Next(e.Inputs)
if !ok {
break
}
switch {
case evt.Type == gesture.TypePress && evt.Source == pointer.Mouse,
evt.Type == gesture.TypeClick && evt.Source == pointer.Touch: