summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Scale.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/Scale.c b/Scale.c
index ce2064a..aa196f7 100644
--- a/Scale.c
+++ b/Scale.c
@@ -573,12 +573,10 @@ Redisplay(Widget w, XEvent *event, Region region)
height = event->xexpose.height;
}
- img_x = min(max((Position) floor((float) x
- / (float) sw->scale.scale_x), 0),
+ img_x = min(max((Position) floor((float) x / sw->scale.scale_x), 0),
(Position) sw->scale.image->width - 1);
- img_y = min(max((Position) floor((float) y
- / (float) sw->scale.scale_y), 0),
+ img_y = min(max((Position) floor((float) y / sw->scale.scale_y), 0),
(Position) sw->scale.image->height - 1);
if (sw->core.visible) {
@@ -771,7 +769,7 @@ Realize(Widget wid, Mask *vmask, XSetWindowAttributes *attr)
{
ScaleWidget sw = (ScaleWidget) wid;
XtCreateWindow(wid, (unsigned int) InputOutput,
- (Visual *) sw->scale.visual, *vmask, attr);
+ sw->scale.visual, *vmask, attr);
}