mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
gesture,widget: drop press markers on gesture cancel
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -91,6 +91,8 @@ func (b *Clickable) update(gtx layout.Context) {
|
||||
|
||||
for _, e := range b.click.Events(gtx) {
|
||||
switch e.Type {
|
||||
case gesture.TypeCancel:
|
||||
b.history = nil
|
||||
case gesture.TypeClick:
|
||||
b.clicks = append(b.clicks, Click{
|
||||
Modifiers: e.Modifiers,
|
||||
|
||||
Reference in New Issue
Block a user