input: Fix possible crash in clip_pointer_motion

It was erronously using output->current->height in one
place where it should use output->height. This may cause
it to create an invalid clipped coordinate in case of output
scaling or transform, because the next round "prev" would
end up NULL.
Alexander Larsson 12 years ago committed by Kristian Høgsberg
parent 6a4e8c62e7
commit bcd18d9b09
  1. 2
      src/input.c

@ -593,7 +593,7 @@ clip_pointer_motion(struct weston_seat *seat, wl_fixed_t *fx, wl_fixed_t *fy)
prev->width - 1);
if (y < prev->y)
*fy = wl_fixed_from_int(prev->y);
else if (y >= prev->y + prev->current->height)
else if (y >= prev->y + prev->height)
*fy = wl_fixed_from_int(prev->y +
prev->height - 1);
}

Loading…
Cancel
Save