mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +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
@@ -76,7 +76,7 @@ func (d *Draggable) Update(gtx layout.Context) (mime string, requested bool) {
|
||||
// Offer the data ready for a drop. Must be called after being Requested.
|
||||
// The mime must be one in the requested list.
|
||||
func (d *Draggable) Offer(gtx layout.Context, mime string, data io.ReadCloser) {
|
||||
gtx.Queue(transfer.OfferCmd{Tag: &d.handle, Type: mime, Data: data})
|
||||
gtx.Execute(transfer.OfferCmd{Tag: &d.handle, Type: mime, Data: data})
|
||||
}
|
||||
|
||||
// Pos returns the drag position relative to its initial click position.
|
||||
|
||||
Reference in New Issue
Block a user