You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the purpose of -loops? In trying to figure out how to fix -loops in bug #73, I'm coming to the conclusion that they will be complex and bring subtle errors in the future. Are they worth it?
Here is the comment I made in that bug report about what we can do to fix -loops for right now and questions we'll need to address in the future:
Certain programs send many more paste requests than they should. For example, middle-click pasting into this very message using Mozilla Firefox triggered 21 paste requests, the first sixteen of which are simply duplicate requests for TARGETS (the list of available targets). Since requests for special targets like TARGETS, TIMESTAMP, and MULTIPLE aren't genuine pastes, they should not increment dloops. This should be fairly easy for us to fix.
However, that still leaves five paste requests for that single middle click. The browser asks for five different targets: text/plain;charset=utf-8, UTF8_STRING, COMPOUND_TEXT, STRING, and text/x-moz-text-internal. Since xclip only holds one format, xclip should decline the other four of those requests and not increment dloops. (This is bug #94).
Once those two problems are solved, we should reevaluate whether the loops feature is still broken.
Once xclip has started sending the data, should it count as a "loop" even if the client reports an error? Generally, it seems like the answer should be "No", but then I don't actually understand the use case for -loops. Is security its purpose? If the -sensitive flag (Added -secure mode to wipe selection buffers and paste once #70, Merging changes to -sensitive #85) will rely on dloops to function, the answer should be "Yes".
Do any applications presume they can request the clipboard a second time instead of caching the data?
How are loops counted if we can handle MULTIPLE requests in a batch (bug ICCCM Compliance: Respond to MULTIPLE target #93)? Does each step count as a loop or do we only increment dloops once? What if some of the steps fail?
What is the purpose of -loops? In trying to figure out how to fix -loops in bug #73, I'm coming to the conclusion that they will be complex and bring subtle errors in the future. Are they worth it?
Here is the comment I made in that bug report about what we can do to fix -loops for right now and questions we'll need to address in the future:
Certain programs send many more paste requests than they should. For example, middle-click pasting into this very message using Mozilla Firefox triggered 21 paste requests, the first sixteen of which are simply duplicate requests for
TARGETS
(the list of available targets). Since requests for special targets likeTARGETS
,TIMESTAMP
, andMULTIPLE
aren't genuine pastes, they should not increment dloops. This should be fairly easy for us to fix.However, that still leaves five paste requests for that single middle click. The browser asks for five different targets:
text/plain;charset=utf-8
,UTF8_STRING
,COMPOUND_TEXT
,STRING
, andtext/x-moz-text-internal
. Since xclip only holds one format, xclip should decline the other four of those requests and not increment dloops. (This is bug #94).Once those two problems are solved, we should reevaluate whether the loops feature is still broken.
-sensitive
flag (Added -secure mode to wipe selection buffers and paste once #70, Merging changes to -sensitive #85) will rely on dloops to function, the answer should be "Yes".MULTIPLE
requests in a batch (bug ICCCM Compliance: Respond to MULTIPLE target #93)? Does each step count as a loop or do we only increment dloops once? What if some of the steps fail?Originally posted by @hackerb9 in #73 (comment)
The text was updated successfully, but these errors were encountered: