Can/should we use the experimental win32 OLE2 DND implementation

We’ve recently found a win32 bug in an upcoming new dialog implementation (see https://gitlab.com/vanntile/inkscape-gsoc-2020 for details) which includes draggable dialogs.

One question that came up: Is it save (or maybe even desirable) to use the OLE2 DND implementation activated through setting the environment variable GDK_WIN32_USE_EXPERIMENTAL_OLE2_DND which seems to solve the particular problem in the implementation?

@lrn I saw you worked last on the OLE2 implementation. Can you comment on any pros/cons of the “experimental” DND implementation?

Also, Inkscape is currently using gtk3 - what are the long-term plans for OLE2 (i.e. will it become the new default? What about gtk4? etc.)?

1 Like

Well, i’ve tried to make OLE2 DnD work and work well. In a sense, it’s not as experimental as it once was, but it’s still not a default. I should probably review it (and any bugs filed against it) at some point before GTK3 freezes for good, and make it the default.

The pros are that it interacts with other applications in a normal Windows fashion. You can DnD between applications this way. The pros of the non-OLE2 DnD (which is LOCAL DnD + DROPFILES DnD) is that LOCAL is implemented entirely inside GDK. I’m not sure that it works better than OLE2 now, but it certainly doesn’t have to deal with the complexities of app interop. When you use OLE2, GDK has to figure out that you’re dragging within the same application (until your mouse cursor goes outside of your window and over some other, foreign window). When you use LOCAL, it’s taken for granted, since LOCAL can’t do DnD between applications. DROPFILES is the only way to accept anything from outside (only accept, mind you) when not using OLE2, and i think it only works for files dragged from Explorer (i didn’t touch it much, to be honest, so i could be wrong).

OLE2 DnD is also somewhat related to clipboard handling (both use the same mechanisms for negotiating data exchange format; LOCAL doesn’t need to negotiate anything, nor does DROPFILES).

Hopefully, GTK4 will use it as default.

Thanks for the fast answer!

So I guess if it works properly for us we’d probably be on a good track by using OLE2 implementation, but I guess we should do some heavy testing first before enabling the “experimental” feature…

One important piece of info is that you’re not planning to move away from OLE2, but would generally favour to make it the default.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.