+ GdkBitmap *mask;
+ if ( icon->GetMask() )
+ mask = icon->GetMask()->GetBitmap();
+ else
+ mask = (GdkBitmap *)NULL;
+
+ GdkPixmap *pixmap = icon->GetPixmap();
+
+ gint width,height;
+ gdk_window_get_size (pixmap, &width, &height);
+
+ GdkColormap *colormap = gtk_widget_get_colormap( m_widget );
+#ifndef __WXGTK20__
+ gtk_widget_push_visual (gdk_colormap_get_visual (colormap));
+#endif
+ gtk_widget_push_colormap (colormap);
+
+ m_iconWindow = gtk_window_new (GTK_WINDOW_POPUP);
+ gtk_widget_set_events (m_iconWindow, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
+ gtk_widget_set_app_paintable (GTK_WIDGET (m_iconWindow), TRUE);
+
+#ifndef __WXGTK20__
+ gtk_widget_pop_visual ();
+#endif
+ gtk_widget_pop_colormap ();
+
+ gtk_widget_set_usize (m_iconWindow, width, height);
+ gtk_widget_realize (m_iconWindow);
+
+ gtk_signal_connect( GTK_OBJECT(m_iconWindow), "configure_event",
+ GTK_SIGNAL_FUNC(gtk_dnd_window_configure_callback), (gpointer)this );
+
+ gdk_window_set_back_pixmap (m_iconWindow->window, pixmap, FALSE);
+
+ if (mask)
+ gtk_widget_shape_combine_mask (m_iconWindow, mask, 0, 0);
+
+ gtk_drag_set_icon_widget( context, m_iconWindow, 0, 0 );