From a376482293460eb1f5c294d926f552ad7e3d0083 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Thu, 11 Jul 2024 02:48:21 -0400 Subject: [PATCH] Add more spec comments --- v2/claim.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/v2/claim.go b/v2/claim.go index 2529fb8..d394207 100644 --- a/v2/claim.go +++ b/v2/claim.go @@ -196,9 +196,14 @@ func (claim *Claim) HandleSelectionClear ( connection *xgbutil.XUtil, event xevent.SelectionClearEvent, ) { - // If a client gives up ownership of a selection or if some other client - // executes a SetSelectionOwner for it and thus reassigns it forcibly, - // the previous owner will receive a SelectionClear event. + // When some other client acquires a selection, the previous owner + // receives a SelectionClear event. The timestamp argument is the time + // at which the ownership changed hands, and the owner argument is the + // window the previous owner specified in its SetSelectionOwner request. + // If an owner loses ownership while it has a transfer in progress (that + // is, before it receives notification that the requestor has received + // all the data), it must continue to service the ongoing transfer until + // it is complete. claim.active = false }