Drag-n-dropping from e.g. Gnome's file manager "Files" works as expected.
From firefox, the data we receive is encoded in UTF-16 wtf??
Looks like a ff bug that we have to workaround.
From gnome-terminal:
case TARGET_MOZ_URL: { char *utf8_data, *newline, *text; char *uris[2]; gsize len;
/* MOZ_URL is in UCS-2 but in format 8. BROKEN! * * The data contains the URL, a \n, then the * title of the web page. */ if (selection_data_format != 8 || selection_data_length == 0 || (selection_data_length % 2) != 0) return;
utf8_data = g_utf16_to_utf8 ((const gunichar2*) selection_data_data, selection_data_length / 2, NULL, NULL, NULL);
...
Drag-n-dropping from e.g. Gnome's file manager "Files" works as expected.
From firefox, the data we receive is encoded in UTF-16 wtf??
Looks like a ff bug that we have to workaround.
From gnome-terminal:
case TARGET_MOZ_URL:
{
char *utf8_data, *newline, *text;
char *uris[2];
gsize len;
/* MOZ_URL is in UCS-2 but in format 8. BROKEN! data_format != 8 ||
selection_ data_length == 0 ||
(selection _data_length % 2) != 0)
*
* The data contains the URL, a \n, then the
* title of the web page.
*/
if (selection_
return;
utf8_data = g_utf16_to_utf8 ((const gunichar2*) selection_ data_data,
selection_ data_length / 2,
NULL, NULL, NULL);
...