io/key: [API] introduce FocusFilter for matching focus and editor events

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2023-10-19 18:31:07 -05:00
parent 12a0ad7038
commit 73c3849da4
8 changed files with 127 additions and 60 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ func (b *Clickable) Update(gtx layout.Context) []Click {
})
}
}
for _, e := range gtx.Events(&b.keyTag) {
for _, e := range gtx.Events(&b.keyTag, key.FocusFilter{}) {
switch e := e.(type) {
case key.FocusEvent:
b.focused = e.Focus