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>
This commit is contained in:
committed by
Bryce Harrington
parent
2e6485c8aa
commit
0720ea36c8
@@ -2078,10 +2078,12 @@ setup_output_seat_constraint(struct drm_backend *b,
|
|||||||
struct udev_seat *seat;
|
struct udev_seat *seat;
|
||||||
|
|
||||||
seat = udev_seat_get_named(&b->input, s);
|
seat = udev_seat_get_named(&b->input, s);
|
||||||
if (seat)
|
if (!seat)
|
||||||
seat->base.output = output;
|
return;
|
||||||
|
|
||||||
if (seat && seat->base.pointer)
|
seat->base.output = output;
|
||||||
|
|
||||||
|
if (seat->base.pointer)
|
||||||
weston_pointer_clamp(seat->base.pointer,
|
weston_pointer_clamp(seat->base.pointer,
|
||||||
&seat->base.pointer->x,
|
&seat->base.pointer->x,
|
||||||
&seat->base.pointer->y);
|
&seat->base.pointer->y);
|
||||||
|
|||||||
Reference in New Issue
Block a user