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.
This commit is contained in:
Georges Basile Stavracas Neto
2019-02-11 08:03:00 -02:00
parent ede79ee1c2
commit f21c943172

View File

@@ -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))