aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/Item.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/generic/Item.c b/generic/Item.c
index f587278..acc362e 100644
--- a/generic/Item.c
+++ b/generic/Item.c
@@ -3987,18 +3987,8 @@ DrawFields(FieldSet field_set)
* Draw the border relief.
*/
if ((field_ptr->relief != RELIEF_FLAT) && (field_ptr->relief_thickness > 1)) {
- ZnPoint p[5];
- p[0].x = r.x;
- p[0].y = r.y;
- p[1].x = p[0].x;
- p[1].y = p[0].y + r.height;
- p[2].x = p[1].x + r.width;
- p[2].y = p[1].y;
- p[3].x = p[2].x;
- p[3].y = p[0].y;
- p[4] = p[0];
- DrawPolygonRelief(wi, field_ptr->relief, field_ptr->gradient,
- p, 5, field_ptr->relief_thickness);
+ DrawRectangleRelief(wi, field_ptr->relief, field_ptr->gradient,
+ &r, (unsigned int) field_ptr->relief_thickness);
}
/*
@@ -4269,7 +4259,13 @@ Repair(WidgetInfo *wi)
wi->damaged_area.orig.x, wi->damaged_area.orig.y,
wi->damaged_area.corner.x, wi->damaged_area.corner.y);*/
- BBox2XRect(&wi->damaged_area, &r);
+ wi->damaged_area.orig.x = r.x = REAL_TO_INT(wi->damaged_area.orig.x);
+ wi->damaged_area.orig.y = r.y = REAL_TO_INT(wi->damaged_area.orig.y);
+ wi->damaged_area.corner.x = REAL_TO_INT(wi->damaged_area.corner.x);
+ wi->damaged_area.corner.y = REAL_TO_INT(wi->damaged_area.corner.y);
+ r.width = wi->damaged_area.corner.x - wi->damaged_area.orig.x;
+ r.height = wi->damaged_area.corner.y - wi->damaged_area.orig.y;
+
wi->damaged_region = XCreateRegion();
XUnionRectWithRegion(&r, wi->damaged_region, wi->damaged_region);