From dce2c58799770490022990015f84ab8c7e1f79f1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 7 Apr 2019 15:11:22 +0000 Subject: [PATCH] widget: Make contains respect rounded borders We have the api for this now. --- gtk/gtkwidget.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index ed0a21f5a7..e118af5852 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -824,9 +824,8 @@ gtk_widget_real_contains (GtkWidget *widget, gtk_css_boxes_init (&boxes, widget); - /* XXX: This misses rounded rects */ - return graphene_rect_contains_point (gtk_css_boxes_get_border_rect (&boxes), - &(graphene_point_t){x, y}); + return gsk_rounded_rect_contains_point (gtk_css_boxes_get_border_box (&boxes), + &GRAPHENE_POINT_INIT (x, y)); } static GtkWidget *