forked from joejulian/gio
gesture: report one event at a time
Events are now delivered one at a time, and this change makes the corresponding change to gestures. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+5
-1
@@ -116,7 +116,11 @@ func (b *Clickable) Update(gtx layout.Context) (Click, bool) {
|
||||
NumClicks: c,
|
||||
}, true
|
||||
}
|
||||
for _, e := range b.click.Update(gtx.Source) {
|
||||
for {
|
||||
e, ok := b.click.Update(gtx.Source)
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
switch e.Kind {
|
||||
case gesture.KindClick:
|
||||
if l := len(b.history); l > 0 {
|
||||
|
||||
Reference in New Issue
Block a user