compositor-drm: Simplify logic in setup_output_seat_constraint

Use early return for a slight simplification.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
dev
Derek Foreman 9 years ago committed by Bryce Harrington
parent 2e6485c8aa
commit 0720ea36c8
  1. 8
      src/compositor-drm.c

@ -2078,10 +2078,12 @@ setup_output_seat_constraint(struct drm_backend *b,
struct udev_seat *seat;
seat = udev_seat_get_named(&b->input, s);
if (seat)
seat->base.output = output;
if (!seat)
return;
seat->base.output = output;
if (seat && seat->base.pointer)
if (seat->base.pointer)
weston_pointer_clamp(seat->base.pointer,
&seat->base.pointer->x,
&seat->base.pointer->y);

Loading…
Cancel
Save