[Top][All Lists]

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

Re: Drag and Drop issue on X11

From: Fred Kiefer
Subject: Re: Drag and Drop issue on X11
Date: Mon, 12 Sep 2011 11:18:20 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv: Gecko/20110907 SUSE/3.1.14 Thunderbird/3.1.14

On 12.09.2011 10:08, Andreas Schik wrote:
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

Thank you for reporting this. I corrected these functions just as you suggested. Please test them after a SVN update.


reply via email to

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