mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
io/key: [API] introduce FocusFilter for matching focus and editor events
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -304,7 +304,7 @@ func (e *Selectable) clickDragEvents(gtx layout.Context) []event.Event {
|
||||
}
|
||||
|
||||
func (e *Selectable) processKey(gtx layout.Context) {
|
||||
for _, ke := range gtx.Events(e) {
|
||||
for _, ke := range gtx.Events(e, key.FocusFilter{}) {
|
||||
switch ke := ke.(type) {
|
||||
case key.FocusEvent:
|
||||
e.focused = ke.Focus
|
||||
|
||||
Reference in New Issue
Block a user