summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2019-02-11 08:03:00 -0200
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2019-02-11 08:03:00 -0200
commitf21c943172e6bc74c078ef93ced40c12e3857c6b (patch)
tree534bc8b2c0ac53f56b73909da76db47e04e6b58b
parentede79ee1c2d39a7f5b3fbbbefd88182ce23f1e75 (diff)
downloadgtk+-gbsneto/rounded-stuff.tar.gz
widget: Do input on bordersgbsneto/rounded-stuff
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.
-rw-r--r--gtk/gtkwidget.c8
1 files 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))