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. Cheers, Andreas
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
