forked from AuroraMiddleware/gtk
widget: Remove set_csd_input_shape
Replace the only caller (unsurprisingly from gtkwindow.c) with a direct call to gdk_surface_input_shape_combine_region.
This commit is contained in:
parent
e552adf05a
commit
6b970c6813
@ -8098,25 +8098,15 @@ gtk_widget_update_input_shape (GtkWidget *widget)
|
||||
if (surface)
|
||||
{
|
||||
cairo_region_t *region;
|
||||
cairo_region_t *csd_region;
|
||||
cairo_region_t *app_region;
|
||||
gboolean free_region;
|
||||
|
||||
app_region = g_object_get_qdata (G_OBJECT (widget), quark_input_shape_info);
|
||||
csd_region = g_object_get_data (G_OBJECT (widget), "csd-region");
|
||||
|
||||
free_region = FALSE;
|
||||
|
||||
if (app_region && csd_region)
|
||||
{
|
||||
free_region = TRUE;
|
||||
region = cairo_region_copy (app_region);
|
||||
cairo_region_intersect (region, csd_region);
|
||||
}
|
||||
else if (app_region)
|
||||
if (app_region)
|
||||
region = app_region;
|
||||
else if (csd_region)
|
||||
region = csd_region;
|
||||
else
|
||||
region = NULL;
|
||||
|
||||
@ -8127,19 +8117,6 @@ gtk_widget_update_input_shape (GtkWidget *widget)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gtk_widget_set_csd_input_shape (GtkWidget *widget,
|
||||
const cairo_region_t *region)
|
||||
{
|
||||
if (region == NULL)
|
||||
g_object_set_data (G_OBJECT (widget), "csd-region", NULL);
|
||||
else
|
||||
g_object_set_data_full (G_OBJECT (widget), "csd-region",
|
||||
cairo_region_copy (region),
|
||||
(GDestroyNotify) cairo_region_destroy);
|
||||
gtk_widget_update_input_shape (widget);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_input_shape_combine_region:
|
||||
* @widget: a #GtkWidget
|
||||
|
@ -279,9 +279,6 @@ gboolean _gtk_widget_consumes_motion (GtkWidget
|
||||
|
||||
gboolean gtk_widget_has_tick_callback (GtkWidget *widget);
|
||||
|
||||
void gtk_widget_set_csd_input_shape (GtkWidget *widget,
|
||||
const cairo_region_t *region);
|
||||
|
||||
gboolean gtk_widget_has_size_request (GtkWidget *widget);
|
||||
|
||||
void gtk_widget_reset_controllers (GtkWidget *widget);
|
||||
|
@ -5335,7 +5335,8 @@ update_csd_shape (GtkWindow *window)
|
||||
if (rect.width > 0 && rect.height > 0)
|
||||
{
|
||||
cairo_region_t *region = cairo_region_create_rectangle (&rect);
|
||||
gtk_widget_set_csd_input_shape (widget, region);
|
||||
|
||||
gdk_surface_input_shape_combine_region (priv->surface, region, 0, 0);
|
||||
cairo_region_destroy (region);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user