#include "gtkdnd.h"
#include "gtkiconfactory.h"
#include "gtkicontheme.h"
-#include "gtkimage.h"
+#include "gtkimageprivate.h"
#include "gtkinvisible.h"
#include "gtkmain.h"
#include "gtkplug.h"
selection_data.data = NULL;
selection_data.length = -1;
selection_data.target = _gtk_quartz_pasteboard_type_to_atom (type);
+ selection_data.display = gdk_display_get_default ();
if (gtk_target_list_find (info->target_list,
selection_data.target,
{
int width = gtk_widget_get_allocated_width (widget);
int height = gtk_widget_get_allocated_height (widget);
+ GtkStyleContext *context = gtk_widget_get_style_context (widget);
- gtk_paint_shadow (gtk_widget_get_style (widget), cr,
- GTK_STATE_NORMAL, GTK_SHADOW_OUT,
- widget, "dnd",
- 0, 0, width, height);
+ gtk_style_context_save (context);
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_DND);
+
+ gtk_render_frame (context, cr, 0, 0, width, height);
+
+ gtk_style_context_restore (context);
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0); /* black */
cairo_set_line_width (cr, 1.0);
{
GtkDragSourceInfo *info;
GdkDragContext *context;
+ GdkDevice *pointer;
NSWindow *nswindow;
context = gdk_drag_begin (gtk_widget_get_window (widget), NULL);
g_idle_add_full (G_PRIORITY_HIGH_IDLE, gtk_drag_begin_idle, context, NULL);
- gdk_pointer_ungrab (0);
+ pointer = gdk_drag_context_get_device (info->context);
+ gdk_device_ungrab (pointer, 0);
return context;
}