[gtk/present-toplevel: 54/54] Rename gdk_surface_input_shape_combine_region
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/present-toplevel: 54/54] Rename gdk_surface_input_shape_combine_region
- Date: Sun, 1 Mar 2020 19:38:14 +0000 (UTC)
commit c3ccb68da86f143bf8f1a2934e6e32ead3cae3da
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 1 11:29:06 2020 -0800
Rename gdk_surface_input_shape_combine_region
There is no shape combining going on anymore, so
call this just gdk_surface_set_input_region, and
remove the offset arguments too. All callers pass
0 anyway.
Update all callers.
gdk/gdksurface.c | 19 ++++++-------------
gdk/gdksurface.h | 6 ++----
gtk/gtkpopover.c | 4 ++--
gtk/gtkwindow.c | 2 +-
4 files changed, 11 insertions(+), 20 deletions(-)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index c6a94f1759..afbc078c17 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -2432,11 +2432,9 @@ gdk_surface_get_root_coords (GdkSurface *surface,
}
/**
- * gdk_surface_input_shape_combine_region:
+ * gdk_surface_set_input_region:
* @surface: a #GdkSurface
- * @shape_region: region of surface to be non-transparent
- * @offset_x: X position of @shape_region in @surface coordinates
- * @offset_y: Y position of @shape_region in @surface coordinates
+ * @region: region of surface to be reactive
*
* Apply the region to the surface for the purpose of event
* handling. Mouse events which happen while the pointer position
@@ -2456,10 +2454,8 @@ gdk_surface_get_root_coords (GdkSurface *surface,
* function does nothing.
*/
void
-gdk_surface_input_shape_combine_region (GdkSurface *surface,
- const cairo_region_t *shape_region,
- gint offset_x,
- gint offset_y)
+gdk_surface_set_input_region (GdkSurface *surface,
+ cairo_region_t *region)
{
g_return_if_fail (GDK_IS_SURFACE (surface));
@@ -2469,11 +2465,8 @@ gdk_surface_input_shape_combine_region (GdkSurface *surface,
if (surface->input_shape)
cairo_region_destroy (surface->input_shape);
- if (shape_region)
- {
- surface->input_shape = cairo_region_copy (shape_region);
- cairo_region_translate (surface->input_shape, offset_x, offset_y);
- }
+ if (region)
+ surface->input_shape = cairo_region_copy (region);
else
surface->input_shape = NULL;
diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h
index 78244c66a5..85380b14fd 100644
--- a/gdk/gdksurface.h
+++ b/gdk/gdksurface.h
@@ -376,10 +376,8 @@ void gdk_surface_set_focus_on_map (GdkSurface *surface,
gboolean focus_on_map);
GDK_AVAILABLE_IN_ALL
-void gdk_surface_input_shape_combine_region (GdkSurface *surface,
- const cairo_region_t *shape_region,
- gint offset_x,
- gint offset_y);
+void gdk_surface_set_input_region (GdkSurface *surface,
+ cairo_region_t *region);
GDK_AVAILABLE_IN_ALL
gboolean gdk_surface_is_viewable (GdkSurface *surface);
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 04a4e17aee..127b152d72 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -1162,11 +1162,11 @@ gtk_popover_update_shape (GtkPopover *popover)
region = gdk_cairo_region_create_from_surface (cairo_surface);
cairo_surface_destroy (cairo_surface);
- gdk_surface_input_shape_combine_region (priv->surface, region, 0, 0);
+ gdk_surface_set_input_region (priv->surface, region);
cairo_region_destroy (region);
}
else
- gdk_surface_input_shape_combine_region (priv->surface, NULL, 0, 0);
+ gdk_surface_set_input_region (priv->surface, NULL);
}
static gint
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 5682365c5f..93c22f7438 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5390,7 +5390,7 @@ update_csd_shape (GtkWindow *window)
if (priv->extra_input_region)
cairo_region_intersect (region, priv->extra_input_region);
- gdk_surface_input_shape_combine_region (priv->surface, region, 0, 0);
+ gdk_surface_set_input_region (priv->surface, region);
cairo_region_destroy (region);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]