[Top][All Lists]

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

Re: Drag and Drop issue on X11

From: Andreas Schik
Subject: Re: Drag and Drop issue on X11
Date: Mon, 12 Sep 2011 12:12:11 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13

Am 12.09.2011 11:18, schrieb Fred Kiefer:
> On 12.09.2011 10:08, Andreas Schik wrote:
>> Hi,
>> I recently came across an issue with DnD on X11. I had the problem that
>> whenever I was dragging a file from GWorkspace to my app the mouse
>> cursor signalled a copy operation w/o me having pressed any modifier.
>> The only thing I could do was switch to the link operation by pressing
>> the according modifier, but all other operations were not accessible.
>> Debugging showed, that despite the fact that GWorkspace was setting the
>> source operation mode to NSDragOperationEvery my app always received the
>> source mode NSDragOperationCopy (or -Link if the modifier was pressed).
>> After digging into the DnD code I came across x11/XGDragView.m in -back.
>> This contains functions to map the GNustep dnd operations to x11
>> operations and vice versa:
>> Atom GSActionForDragOperation(unsigned int op) and NSDragOperation
>> GSDragOperationForAction(Atom xaction)
>> Unfortunately, both functions do not respect the new operation
>> NSDragOperationEvery which is supposed to replace the deprected
>> NSDragOperationAll. As GWorkspace, however, sets its operation mode to
>> NSDragOperationEvery, GSActionForDragOperation falls through the first
>> condition and translates -Every to XdndActionCopy. It must catch -Every
>> and translate it to XdndActionAsk (the same as with all).
>> Concerning the function GSDragOperationForAction, this should IMHO
>> translate XdndActionAsk to NSDragOperationEvery instead of
>> NSDragOperationAll.
> Thank you for reporting this. I corrected these functions just as you
> suggested. Please test them after a SVN update.

Works as I expected it to. Thanks.


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]