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



commit 73c212d89b33758ce2e4d81ecd97bf8f511ded43
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 f928041973..404bdc9b1d 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -1155,11 +1155,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;
@@ -1177,11 +1175,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]