mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 16:35:36 +00:00
io/input: [API] execute commands immediately
Change the semantics of commands to execute immediately. In cases where execution of a command introduces a inconsistency, freeze event routing and defer the command as well as queued events to the next frame. Rename Source.Queue to Source.Execute to better fit the new command semantics. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ func (e *Enum) Update(gtx layout.Context) bool {
|
||||
switch ev.Kind {
|
||||
case gesture.KindPress:
|
||||
if ev.Source == pointer.Mouse {
|
||||
gtx.Queue(key.FocusCmd{Tag: &state.tag})
|
||||
gtx.Execute(key.FocusCmd{Tag: &state.tag})
|
||||
}
|
||||
case gesture.KindClick:
|
||||
if state.key != e.Value {
|
||||
|
||||
Reference in New Issue
Block a user