diff --git a/ChangeLog b/ChangeLog index 77fef5ffec..7b6691afdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-07-17 Richard Hult + + * gtk/gtkdnd-quartz.c: (gtk_drag_begin_internal): Set an empty + NSImage if there is none, covers the cases where applications try + to set a pixmap which is not supported by the quartz backend. + 2006-07-17 Richard Hult * gdk/quartz/gdkevents-quartz.c: (create_key_event): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 77fef5ffec..7b6691afdf 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2006-07-17 Richard Hult + + * gtk/gtkdnd-quartz.c: (gtk_drag_begin_internal): Set an empty + NSImage if there is none, covers the cases where applications try + to set a pixmap which is not supported by the quartz backend. + 2006-07-17 Richard Hult * gdk/quartz/gdkevents-quartz.c: (create_key_event): diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c index c868674603..ec44ef64e1 100644 --- a/gtk/gtkdnd-quartz.c +++ b/gtk/gtkdnd-quartz.c @@ -1040,11 +1040,28 @@ gtk_drag_begin_internal (GtkWidget *widget, switch (site->icon_type) { case GTK_IMAGE_PIXMAP: - gtk_drag_set_icon_pixmap (context, - site->colormap, - site->icon_data.pixmap.pixmap, - site->icon_mask, - -2, -2); + /* This is not supported, so just set a small transparent pixbuf + * since we need to have something. + */ + if (0) + gtk_drag_set_icon_pixmap (context, + site->colormap, + site->icon_data.pixmap.pixmap, + site->icon_mask, + -2, -2); + else + { + GdkPixbuf *pixbuf; + + pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 1, 1); + gdk_pixbuf_fill (pixbuf, 0xffffff); + + gtk_drag_set_icon_pixbuf (context, + pixbuf, + 0, 0); + + g_object_unref (pixbuf); + } break; case GTK_IMAGE_PIXBUF: gtk_drag_set_icon_pixbuf (context,