[gtk/wip/baedert/for-master: 83/86] popover: Stop using gtk_widget_input_shape_combine_region()



commit 576580bbecf68bcad7946fa369d39e71026b7fe5
Author: Timm Bäder <mail baedert org>
Date:   Sat Feb 22 15:28:44 2020 +0100

    popover: Stop using gtk_widget_input_shape_combine_region()
    
    We control the surface anyway, we can as well set the input shape on it
    directly.

 gtk/gtkpopover.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 286388bb2d..6d4faab24a 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -1145,11 +1145,9 @@ static void
 gtk_popover_update_shape (GtkPopover *popover)
 {
   GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
-  GtkWidget *widget = GTK_WIDGET (popover);
 
   if (priv->has_arrow)
     {
-
       cairo_surface_t *cairo_surface;
       cairo_region_t *region;
       cairo_t *cr;
@@ -1167,11 +1165,11 @@ gtk_popover_update_shape (GtkPopover *popover)
       region = gdk_cairo_region_create_from_surface (cairo_surface);
       cairo_surface_destroy (cairo_surface);
 
-      gtk_widget_input_shape_combine_region (widget, region);
+      gdk_surface_input_shape_combine_region (priv->surface, region, 0, 0);
       cairo_region_destroy (region);
     }
   else
-    gtk_widget_input_shape_combine_region (widget, NULL);
+    gdk_surface_input_shape_combine_region (priv->surface, NULL, 0, 0);
 }
 
 static gint


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]