mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +00:00
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
@@ -47,7 +47,11 @@ func (e *Enum) Update(gtx layout.Context) bool {
|
||||
e.hovering = false
|
||||
changed := false
|
||||
for _, state := range e.keys {
|
||||
for _, ev := range state.click.Update(gtx.Source) {
|
||||
for {
|
||||
ev, ok := state.click.Update(gtx.Source)
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
switch ev.Kind {
|
||||
case gesture.KindPress:
|
||||
if ev.Source == pointer.Mouse {
|
||||
|
||||
Reference in New Issue
Block a user