[Lazarus] GTK2: Drag files to other applications (to the file manager, Thunar, Nautilus, etc)

Hans-Peter Diettrich DrDiettrich1 at aol.com
Thu Aug 23 21:56:33 CEST 2012


Graeme Geldenhuys schrieb:

> Then it's just amazing how toolkits like fpGUI and Qt managed to
> implement cross-platform drag-n-drop by giving the toolkit users a
> single DND API to work with - completely hiding the complexities of
> each platform. Wow, we must be good at what we do. ;-)

This demonstrates that the support doesn't require widgets. As well as:

> Oh, and Qt moved in v4.4 to a single handle per window design, thus no
> widget has its own window handle any more. They also openly admitted
> that they had to do a lot of "fake window handle" trickery to get DND
> to continue working on platforms like Windows - which require window
> handles for DND to work.

Every window already has a Handle, no trickery is required here. What 
remains is processing the messages sent to this HWND, what can be called 
"black magic" only by marketing experts, not by coders which understand 
the GUI principles.

[...]

> But please don't let that deter you from submitting a fully working
> x-platform DND implementation without window handles to the FPC
> project. I'm sure everybody would welcome such a contribution, and I
> would love to study your implementation.

You too did not really understand DND basics :-(

As I already mentioned, a window handle is always required for the 
processing of mouse moves etc. in the window manager. You should 
understand that this handle is related to a window - a region on the 
screen - not to a widget.

DoDi





More information about the Lazarus mailing list