Home » Developing U++ » U++ Developers corner » Stupid X11 Xdnd problem...
Stupid X11 Xdnd problem... [message #9785] |
Wed, 30 May 2007 13:40  |
 |
mirek
Messages: 14261 Registered: November 2005
|
Ultimate Member |
|
|
Situation: Dropping files onto application.
The problem here is that dropping files should accept file no matter on which widget it is dropped.
Anyway, it would be extremely tedious to make any widget a target for file drop.
Therefore, while working on this in Win32, if child does not accept the drag, it goes recursively up via ChildDragAndDrop method, until it is either accepted or top ctrl is reached.
So far so good, this made D&D of files easily implementable, in Windows (see examples/UWord).
However, in X11 this approach fails, because Gnome file manager puts the file list in several formats (besides "text/uri-list" which is the format for file lists), including STRING and STRING_UTF8 -> these are accepted by all U++ text editors. Means child widget wrongly eats the drop and it never gets to its parent.
I see two possible solution, but at the moment like neither:
- reverse ChildDragAndDrop call order -> it would be called for the top-level Ctrl first and then for childs until DragAndDrop for final widget is called
- handle this situation by supressing all other text formats if text/uri-list is present (but this might reduce the usability of some applications).
Any thoughts?
Mirek
|
|
|
Goto Forum:
Current Time: Fri Jun 20 21:29:07 CEST 2025
Total time taken to generate the page: 0.04651 seconds
|