Commit aa1307a7 authored by Gustavo Noronha Silva's avatar Gustavo Noronha Silva

Fix off by one in check for GtkRoundedBox containing a rectangle

When checking if a rectangle is contained by the rounded box, the code
will refuse a rectangle which is the exact size as the one backing the
rounded box, since it checks for greater or equal width and height.
Check for greater only instead.

https://bugzilla.gnome.org/show_bug.cgi?id=774114
parent 5301644a
......@@ -722,8 +722,8 @@ _gtk_rounded_box_contains_rectangle (const GtkRoundedBox *box,
{
if (x1 < box->box.x ||
y1 < box->box.y ||
x2 >= box->box.x + box->box.width ||
y2 >= box->box.y + box->box.height)
x2 > box->box.x + box->box.width ||
y2 > box->box.y + box->box.height)
return FALSE;
if (x1 < box->box.x + box->corner[GTK_CSS_TOP_LEFT].horizontal &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment