summaryrefslogtreecommitdiff
path: root/gtk/gtkdnd.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-08-14 06:38:11 +0200
committerBenjamin Otte <otte@redhat.com>2010-09-26 15:02:59 +0200
commit806a7239aef9f20f06391ca01e991afd79b27874 (patch)
tree2f592a6edd0adeacaff3f6e823f47927579bc421 /gtk/gtkdnd.c
parent8b4d50dd1d054325b31aecc53bb117c76774092f (diff)
downloadgtk+-806a7239aef9f20f06391ca01e991afd79b27874.tar.gz
widget: shape_combine_mask => shape_cobine_region
Replace gtk_widget_shape_combine_region() with gtk_widget_shape_combine_mask() and gtk_widget_input_shape_combine_region() with gtk_widget_input_shape_combine_mask(). As GdkBitmap is going away, and the region equivalents already exist, this seems like pretty much the default step to take. Includes code to fix up the users.
Diffstat (limited to 'gtk/gtkdnd.c')
-rw-r--r--gtk/gtkdnd.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index beaffa55fc..eb08735ab8 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -3139,8 +3139,16 @@ icon_window_realize (GtkWidget *window,
if (mask)
{
- gtk_widget_shape_combine_mask (window, mask, 0, 0);
- g_object_unref (mask);
+ cairo_region_t *region;
+ cairo_t *cr;
+
+ /* XXX: Clean this up properly */
+ cr = gdk_cairo_create (mask);
+ region = gdk_cairo_region_create_from_surface (cairo_get_target (cr));
+ cairo_destroy (cr);
+
+ gtk_widget_shape_combine_region (window, region);
+ cairo_region_destroy (region);
}
}
@@ -3327,7 +3335,18 @@ gtk_drag_set_icon_pixmap (GdkDragContext *context,
pixmap, FALSE);
if (mask)
- gtk_widget_shape_combine_mask (window, mask, 0, 0);
+ {
+ cairo_region_t *region;
+ cairo_t *cr;
+
+ /* XXX: Clean this up properly */
+ cr = gdk_cairo_create (mask);
+ region = gdk_cairo_region_create_from_surface (cairo_get_target (cr));
+ cairo_destroy (cr);
+
+ gtk_widget_shape_combine_region (window, region);
+ cairo_region_destroy (region);
+ }
gtk_drag_set_icon_window (context, window, hot_x, hot_y, TRUE);
}