From f21c943172e6bc74c078ef93ced40c12e3857c6b Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 11 Feb 2019 08:03:00 -0200 Subject: [PATCH] widget: Do input on borders The current pick implementation ignores input on borders, which deviates from the expected GTK4 behavior. Adapt the input rectangle to consider the widget borders as well. --- gtk/gtkwidget.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index e144fc6087..8aab610d86 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -11261,10 +11261,10 @@ gtk_widget_pick (GtkWidget *widget, get_box_padding (style, &padding); get_border_radius (style, border_radius); - rect = GRAPHENE_RECT_INIT (- padding.left, - - padding.top, - priv->allocation.width - margin.left - margin.right - border.left - border.right, - priv->allocation.height - margin.top - margin.bottom - border.top - border.bottom); + rect = GRAPHENE_RECT_INIT (- padding.left - border.left, + - padding.top - border.top, + priv->allocation.width - margin.left - margin.right, + priv->allocation.height - margin.top - margin.bottom); if (has_border_radius (border_radius))