diff options
author | Benjamin Otte <otte@redhat.com> | 2018-03-15 03:01:58 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2018-03-16 06:04:45 +0100 |
commit | 9e54c22c49062c615f37dbb7f67472f788e0ab5a (patch) | |
tree | e7379b59dc0b6bcafa262fa247a0c963001522bf /gtk/gtkdnd.c | |
parent | 01f996447e15094f72d14addb1634623bebb61c1 (diff) | |
download | gtk+-9e54c22c49062c615f37dbb7f67472f788e0ab5a.tar.gz |
image: Don't handle surfaces anymore
Lots of special cases that are no longer needed because no code uses
surfaces.
Also remove the GdkCellRendererPixbuf:surface property.
Diffstat (limited to 'gtk/gtkdnd.c')
-rw-r--r-- | gtk/gtkdnd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index ef96eeda95..3eb081687b 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -38,6 +38,7 @@ #include "gtkwindowprivate.h" #include "gdk/gdkcontentformatsprivate.h" +#include "gdk/gdktextureprivate.h" #include <math.h> #include <stdlib.h> @@ -1195,6 +1196,7 @@ gtk_drag_set_icon_surface (GdkDragContext *context, { GtkWidget *widget; double hot_x, hot_y; + GdkTexture *texture; g_return_if_fail (GDK_IS_DRAG_CONTEXT (context)); g_return_if_fail (surface != NULL); @@ -1202,7 +1204,9 @@ gtk_drag_set_icon_surface (GdkDragContext *context, cairo_surface_get_device_offset (surface, &hot_x, &hot_y); cairo_surface_set_device_offset (surface, 0, 0); - widget = gtk_image_new_from_surface (surface); + texture = gdk_texture_new_for_surface (surface); + widget = gtk_image_new_from_texture (texture); + g_object_unref (texture); gtk_drag_set_icon_widget_internal (context, widget, (int)hot_x, (int)hot_y, TRUE); } |