mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
io/input: tighten tests
Now that event delivery can be interleaved with commands, tests can be made more precise. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -902,11 +902,11 @@ g 2 4 6 8 g
|
||||
|
||||
var tim time.Duration
|
||||
selected := func(start, end int) string {
|
||||
gtx.Execute(key.FocusCmd{Tag: e})
|
||||
// Layout once with no events; populate e.lines.
|
||||
e.Layout(gtx, cache, font, fontSize, op.CallOp{}, op.CallOp{})
|
||||
e.Events() // throw away any events from this layout
|
||||
|
||||
gtx.Execute(key.FocusCmd{Tag: e})
|
||||
r.Frame(gtx.Ops)
|
||||
gtx.Source = r.Source()
|
||||
// Build the selection events
|
||||
|
||||
Reference in New Issue
Block a user