[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Proposal for clipboard extensions

On Monday 18 of November 2002 11:36, Lubos Lunak wrote:
> On Friday 15 November 2002 21:00, Owen Taylor wrote:
>  Ok, very good. I think this makes the *_SENTINEL notification stuff in the
> proposal obsolete, replaced by XAreSelectionNotificationsSupported(),
> XIWantNotificationsForThisSelection() and a new event containing the
> selection atom and a timestamp, sent right after SelectionClear event
> (right?).
> [snipped some now uninteresting stuff about notifications]

 Since the selection change notification part doesn't seem to be needed 
anymore, this leaves only limiting the transfer size. I tried to rewrite it 
with the suggestions in mind. Is it ok now?

 Selection target _NET_MAX_SELECTION_SIZE

 When a client encounters target _NET_MAX_SELECTION_SIZE in SelectionRequest 
event, it should use its value as a limit for the following targets in the 
same request (i.e. the request should be of type MULTIPLE). The 
_NET_MAX_SELECTION_SIZE target should be always the first target in the 
MULTIPLE request.

 The target _NET_MAX_SELECTION_SIZE is a side-effect target, as described in 
ICCCM section 2.6.3. When handling this target, the matching property on the 
requestor window should be of type XA_INTEGER, format 32, with 2 elements. 

 If the selection owner's connection to the X server is local, the first 
element is used as the limit, otherwise the second element is used as the 
limit. A local connection is identified by a value of XDisplayString() with 
the first character ':', for example, ":0.0". A value of -1 for either 
element means no limit.

 The value should limit the sum of the sizes in the request, not separately 
each of them. The client should reject subsequent targets if they would cause 
the total amount of data transferred for all targets to exceed the limit. 
Note that there is no requirement that if one target is rejected, all other
targets will be rejected or all that subsequent targets will be

 Clients are not required to limit the data size precisely to the given value. 
If the computation of the data size would be expensive for the client, a 
certain reasonable inaccurancy is allowed. In other words, if the client for 
various reasons doesn't know exact size of the data to be transfered, it 
should try to estimate it, rather than transfering data with size that is 
possibly magnitudes larger.

The intent of this target is to avoid unwanted large transfers, so it should 
be requsted only by xclipboard-like tools. They should use a request of type 
MULTIPLE with _NET_MAX_SELECTION_SIZE as the first target in the MULTIPLE 
request, with the requested target(s) after it.

Lubos Lunak
KDE developer
SuSE CR, s.r.o.  e-mail: l lunak suse cz , l lunak kde org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]