ui/gesture: switch Click to return all events

Simpler and more ergonomic for clients.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-07-11 23:43:42 +02:00
parent 1735d5ced8
commit 37ac75f3bb
2 changed files with 6 additions and 9 deletions
+1 -5
View File
@@ -97,11 +97,7 @@ func (e *Editor) Next() (EditorEvent, bool) {
e.scrollOff.Y += sdist
soff = e.scrollOff.Y
}
for {
evt, ok := e.clicker.Next(e.Inputs)
if !ok {
break
}
for _, evt := range e.clicker.Events(e.Inputs) {
switch {
case evt.Type == gesture.TypePress && evt.Source == pointer.Mouse,
evt.Type == gesture.TypeClick && evt.Source == pointer.Touch: