Commit 3bf11510 authored by John Ralls's avatar John Ralls

Fix Quartz clipboard image retrieval.

It does no good to iterate through a series of mime types to call a
function when the eventually-called function,
_gtk_quartz_get_selection_data_from_pasteboard() in this case, gives the
wrong answer and stops the iteration on all but one especially if that
one isn't first.

The one is "image/tiff" and the quartz pasteboard function will return
any image type Quartz knows about for it, so lose the iteration and use
only "image/tiff".
parent 1bd0431a
......@@ -860,23 +860,18 @@ gtk_clipboard_wait_for_text (GtkClipboard *clipboard)
GdkPixbuf *
gtk_clipboard_wait_for_image (GtkClipboard *clipboard)
{
const gchar *priority[] = { "image/png", "image/tiff", "image/jpeg", "image/gif", "image/bmp" };
GdkAtom target = gdk_atom_intern_static_string("image/tiff")
int i;
GtkSelectionData *data;
for (i = 0; i < G_N_ELEMENTS (priority); i++)
{
data = gtk_clipboard_wait_for_contents (clipboard, gdk_atom_intern_static_string (priority[i]));
data = gtk_clipboard_wait_for_contents (clipboard, target);
if (data)
if (data && data->data)
{
GdkPixbuf *pixbuf = gtk_selection_data_get_pixbuf (data);
gtk_selection_data_free (data);
return pixbuf;
}
}
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment