diff options
Diffstat (limited to 'Scale.c')
-rw-r--r-- | Scale.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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); } |