When files are dragged from a file manager window to an FLTK app,platform-specific behaviours are presently as attached.
I don't remember what X11 configuration produces "file://" prefixesand URI-encoded filenames. That's not what I see now.
Shouldn't we uniformize this and have the X11 platform behave asall others do, that is, put pathnames on separate lines without encoding
nor prefixes ?
That would make 1.4 slightly changed relatively to 1.3 in behaviourbut not in API. Nevertheless, user code that would decode encodedfilenames or that would remove "file://" prefixes would just do nothing
with the uniformized behaviour. Existing 1.3 code would be largely compatiblewith the modified 1.4 behaviour with no change.
The only differencewould be that an app expecting multiple pathnames on a single line wouldreceive them on successive lines.
Comments? Suggestions?
Here are some examples, created with three different file managers (nemo, nautilus, thunar) and the FLTK editor example program in Wayland and/or X11 mode:
nemo DND to FLTK editor in Wayland mode:davs://info%40<my_domain>@webdav.<my_cloud>/users/<my_domain>/fltk/glpuzzle.pngdavs://info%40<my_domain>@webdav.<my_cloud>/users/<my_domain>/fltk/keyboards.pngnautilus DND to FLTK editor in Wayland mode:file:///run/user/1000/gvfs/dav:host=webdav.<my_cloud>,ssl=true,user=info%2540<my_domain>/users/<my_domain>/fltk/glpuzzle.pngfile:///run/user/1000/gvfs/dav:host=webdav.<my_cloud>,ssl=true,user=info%2540<my_domain>/users/<my_domain>/fltk/keyboards.pngthunar: No DND and no copy/paste to editor with in Wayland modethunar DND to FLTK editor in x11 mode (see note 2 below):file:///run/user/1000/gvfs/dav:host=webdav.<my_cloud>,ssl=true,user=info%2540<my_domain>/users/<my_domain>/bilder/Screenshot%20from%202020-05-30%2021-20-16.pngfile:///run/user/1000/gvfs/dav:host=webdav.<my_cloud>,ssl=true,user=info%2540<my_domain>/users/<my_domain>/bilder/Screenshot%20from%202020-12-22%2022-52-41.pngthunar copy-paste to FLTK editor in x11 mode (see note 2 below):davs://info%40<my_domain>@webdav.<my_cloud>/users/<my_domain>/bilder/Screenshot%20from%202020-05-30%2021-20-16.pngdavs://info%40<my_domain>@webdav.<my_cloud>/users/<my_domain>/bilder/Screenshot%20from%202020-12-22%2022-52-41.png(End of examples)
Le lundi 6 mars 2023 à 17:52:49 UTC+1, Albrecht Schlosser a écrit :
Here are some examples, created with three different file managers (nemo, nautilus, thunar) and the FLTK editor example program in Wayland and/or X11 mode:
nemo DND to FLTK editor in Wayland mode:davs://info%40<my_domain>@webdav.<my_cloud>/users/<my_domain>/fltk/glpuzzle.pngdavs://info%40<my_domain>@webdav.<my_cloud>/users/<my_domain>/fltk/keyboards.pngnautilus DND to FLTK editor in Wayland mode:file:///run/user/1000/gvfs/dav:host=webdav.<my_cloud>,ssl=true,user=info%2540<my_domain>/users/<my_domain>/fltk/glpuzzle.pngfile:///run/user/1000/gvfs/dav:host=webdav.<my_cloud>,ssl=true,user=info%2540<my_domain>/users/<my_domain>/fltk/keyboards.pngthunar: No DND and no copy/paste to editor with in Wayland modethunar DND to FLTK editor in x11 mode (see note 2 below):file:///run/user/1000/gvfs/dav:host=webdav.<my_cloud>,ssl=true,user=info%2540<my_domain>/users/<my_domain>/bilder/Screenshot%20from%202020-05-30%2021-20-16.pngfile:///run/user/1000/gvfs/dav:host=webdav.<my_cloud>,ssl=true,user=info%2540<my_domain>/users/<my_domain>/bilder/Screenshot%20from%202020-12-22%2022-52-41.pngthunar copy-paste to FLTK editor in x11 mode (see note 2 below):davs://info%40<my_domain>@webdav.<my_cloud>/users/<my_domain>/bilder/Screenshot%20from%202020-05-30%2021-20-16.pngdavs://info%40<my_domain>@webdav.<my_cloud>/users/<my_domain>/bilder/Screenshot%20from%202020-12-22%2022-52-41.png(End of examples)
I'm afraid these examples didn't use the last code for Wayland which changed yesterday.Wayland now produces the same as Windows and macOS, that is pathnames, one per line, except for specialprefixes such as "davfs://" that produce as in these examples.
There's something strange in some encoded strings visible above such as "user=info%2540<my_domain>" .
This seems to have been encoded twice, and thus to require being decoded twice to come out correctly.1st decoding: %25 gives % because 0x25 is the codepoint of %2nd decoding: %40 gives @ because 0x40 is the codepoint of @Final result: user-info@<my_domain>
The correct encoding in one go I would have expected to see is "user-info%40<my_domain>".