simon-git: xcopy (master): xcopy.git

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Fri Dec 2 18:21:32 GMT 2016


TL;DR:
  0b98605 Prevent premature and multiple drops into Firefox.

Repository:     https://git.tartarus.org/simon/xcopy.git
On the web:     https://git.tartarus.org/?p=simon/xcopy.git
Branch updated: master
Committer:      xcopy.git
Date:           2016-12-02 18:21:32

commit 0b986051ac0cc22a47d86cfbada03e3662adf74f
web diff https://git.tartarus.org/?p=simon/xcopy.git;a=commitdiff;h=0b986051ac0cc22a47d86cfbada03e3662adf74f;hp=737a9bb5f3b2b26a86ce1ab0e78a33874e0b1fe3
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Dec 2 18:15:58 2016 +0000

    Prevent premature and multiple drops into Firefox.
    
    I've recently (perhaps due to a Firefox update, but I'm not sure)
    begun to experience a phenomenon where I'll use xcopy --drop to try to
    drag a file:// URI into a Firefox web form, and instead of Firefox
    waiting until I click the mouse button and then accepting the drop
    once, it now seems to accept the drop multiple times while I'm still
    indecisively hovering the mouse over the drop area - so I get many
    copies of the same file dropped into the target area of the web page,
    before I even decided to commit to the action.
    
    I suspect it's probably in the wrong to do that - surely it shouldn't
    request the contents of the drop selection before I send the XdndDrop
    client message to commit the drop, or at the very least it should
    treat the results as purely informative. But it's easily worked around
    at this end, by _refusing_ requests for the drop selection as
    appropriate.
    
    Specifically, this change causes all requests for XdndSelection to be
    refused, unless and until we have sent XdndDrop, whereupon the next
    request will be accepted - but even then, I take care to accept only
    _one_, because I've found that otherwise current Firefox can doubly
    accept the drop.

 xcopy.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)



More information about the tartarus-commits mailing list