gnustep-dev
[Top][All Lists]
Advanced

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

Re: X Dragging interaction


From: Fred Kiefer
Subject: Re: X Dragging interaction
Date: Fri, 21 Dec 2001 14:17:55 +0100

Hi Richard,

Richard Frith-Macdonald wrote:
> 
> On Friday, December 21, 2001, at 12:32 AM, Fred Kiefer wrote:
> > This implementation lacks some elegance, as the drag pasteboard is no
> > longer managed by a shared background process and different GNUstep
> > applications running at the same time, may have to declare the same
> > types to the drag pasteboard when the drag cursor moves over them. Still
> > it is the only working solution I see.
> 
> Looks feasible ... I first thought that not using the drag pasteboard and
> doing everything in the view code would be a problem - but checking the
> documentation, it seems that a well-behaved drag recipient should send a
> '-draggingPasteboard' message to the 'sender' supplied as the argument to
> the '-performDragOperation:'  and of course this method could set up a
> pasteboard from X data and return the pasteboard object without talking
> to the pasteboard server.
> I guess, If we wanted to be sure that the drag pasteboard actually
> contained
> the drag data, we could send the data to the pasteboard server before
> calling
> the -performDragOperation: method on the destination anyway.

you directly spotted the weak point of this idea and even provided a
solution. Great! 
The problem was what would happen if we do a drag from one GNUstep
application to another. Here we cannot just fill the drag pasteboard
with data from X as soon as the target application is entered (As we
would do for a normal X drag). This would only overwrite the data that
is already in the drag pasteboard, so that the source application no
longer owns it. But on the other side a GNUstep application cannot tell,
if the correct data is already in the drag pasteboard.
Your solution to set up another (anonymous) pasteboard in the target
application, declare the available types and get the data via X when we
do a drop should work. Thank you for this, I have been thinking about
this problem half the night.

Fred




reply via email to

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