[gtk/present-toplevel-2: 27/59] Rename gdk_surface_input_shape_combine_region



commit 3a24444b589be3ad11fc60bd8545248a8219cd9b
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 b3a642c635..cf26304743 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -2363,11 +2363,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
@@ -2387,10 +2385,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));
 
@@ -2400,11 +2396,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 c5af6d76fa..89a1733ea5 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 90ab3927c0..d1dfd74f34 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -1163,11 +1163,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 af4dd6b9c0..0d3da3d0d1 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5407,7 +5407,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]