widget: remove focus on click behavior from Clickable

This is a breaking change, users that need the old behavior can implement it using the existing API.

Fixes: https://todo.sr.ht/~eliasnaur/gio/511
Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu>
This commit is contained in:
Walter Werner SCHNEIDER
2025-07-08 15:11:45 +03:00
committed by Elias Naur
parent b2f6707ad1
commit b2b12d6288
-4
View File
@@ -9,7 +9,6 @@ import (
"gioui.org/gesture" "gioui.org/gesture"
"gioui.org/io/event" "gioui.org/io/event"
"gioui.org/io/key" "gioui.org/io/key"
"gioui.org/io/pointer"
"gioui.org/io/semantic" "gioui.org/io/semantic"
"gioui.org/layout" "gioui.org/layout"
"gioui.org/op" "gioui.org/op"
@@ -141,9 +140,6 @@ func (b *Clickable) update(t event.Tag, gtx layout.Context) (Click, bool) {
} }
} }
case gesture.KindPress: case gesture.KindPress:
if e.Source == pointer.Mouse {
gtx.Execute(key.FocusCmd{Tag: t})
}
b.history = append(b.history, Press{ b.history = append(b.history, Press{
Position: e.Position, Position: e.Position,
Start: gtx.Now, Start: gtx.Now,