I had occasion to delve into drag and drop and I could write a book about that as well as program it in 5 languages through 4 interfaces. The core is a shared data structure, and you wouldn't think that would be all that hard to handle, but when you pour in a cup each of Wayland, cross platform compatibility, Qt, GTK, wxPython, C++, C, X11, Windows, Mac, and a lack of strong common purpose, you get a bitter tasting soup.( While studying Schmidtea mediterranea and monitoring courses in embryology and proteomics as well as distributed AI visual hash analysis in a UDP network.) It isn't any fun unless it is impossible.
In the process I went through Mozilla source, Qt sources, GTK, X11 specifications and created several programs in python, C and C++. Now I know that GTK arises from GIMP toolkit and Qt is Trolltech and they are different animals altogether. The reason I even dived into this seemingly bottomless pit of complexity, is because I couldn't drag and drop from Firefox to wxPython, and every other application including chrome was inter-operable. That seems a bit odd considering the origins and intent as you would think that Firefox would want to be perfect on a major Linux distro. So I jumped and 20 hours later I hit the bottom unexpectedly. Now I know and I can code it directly in X11 C code, which is what I like to do just for fun and on top of that I can solve the incompatibility with some automagic. I am not sure what I have gained, except that it lets me know that I can dive from the UI to the deepest levels of machine code and not lose my way.
XEvent.xclient.data.l = automagic(GLint sleep, (char *)("perchance to dream"));
nop ; = 90h or 0x90 if you are so inclined
sti ; Yes I am only sleeping to be awakened rudely
0xF4 ;HLT is a privileged instruction; #GP(0) if the current privilege level is not 0
; 5 clock cycles from nirvana.....
Or maybe I can go deeper down to the transistor.
All in a day's work.