mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
all: [API] deliver events one at a time to allow fine-grained event processing
Processing one event at a time allows a widget to execute commands after the event that triggered it, instead of after all matching events. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+5
-1
@@ -380,7 +380,11 @@ func (e *Editor) processKey(gtx layout.Context) {
|
||||
}
|
||||
// adjust keeps track of runes dropped because of MaxLen.
|
||||
var adjust int
|
||||
for _, ke := range gtx.Events(&e.eventKey, filters...) {
|
||||
for {
|
||||
ke, ok := gtx.Event(&e.eventKey, filters...)
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
e.blinkStart = gtx.Now
|
||||
switch ke := ke.(type) {
|
||||
case key.FocusEvent:
|
||||
|
||||
Reference in New Issue
Block a user