Set an empty NSImage if there is none, covers the cases where applications

2006-07-17  Richard Hult  <richard@imendio.com>

	* 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.
This commit is contained in:
Richard Hult
2006-07-17 21:21:25 +00:00
committed by Richard Hult
parent 6d8662d3d9
commit 51edd19e16
3 changed files with 34 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2006-07-17 Richard Hult <richard@imendio.com>
* 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 <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: (create_key_event):

View File

@ -1,3 +1,9 @@
2006-07-17 Richard Hult <richard@imendio.com>
* 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 <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c: (create_key_event):

View File

@ -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,