barriers: Reindent the constrainment hook
This is to make future diffs much cleaner. Best viewed with -w. Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
97da74c80e
commit
85a37ddcc2
|
@ -311,13 +311,14 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen,
|
||||||
BarrierScreenPtr cs = GetBarrierScreen(screen);
|
BarrierScreenPtr cs = GetBarrierScreen(screen);
|
||||||
int x = dest_x,
|
int x = dest_x,
|
||||||
y = dest_y;
|
y = dest_y;
|
||||||
|
|
||||||
if (!xorg_list_is_empty(&cs->barriers) && !IsFloating(dev)) {
|
|
||||||
int dir;
|
int dir;
|
||||||
int i;
|
int i;
|
||||||
struct PointerBarrier *nearest = NULL;
|
struct PointerBarrier *nearest = NULL;
|
||||||
PointerBarrierClientPtr c;
|
PointerBarrierClientPtr c;
|
||||||
|
|
||||||
|
if (xorg_list_is_empty(&cs->barriers) || IsFloating(dev))
|
||||||
|
goto out;
|
||||||
|
|
||||||
/* How this works:
|
/* How this works:
|
||||||
* Given the origin and the movement vector, get the nearest barrier
|
* Given the origin and the movement vector, get the nearest barrier
|
||||||
* to the origin that is blocking the movement.
|
* to the origin that is blocking the movement.
|
||||||
|
@ -346,8 +347,8 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen,
|
||||||
current_y = y;
|
current_y = y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
out:
|
||||||
*out_x = x;
|
*out_x = x;
|
||||||
*out_y = y;
|
*out_y = y;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue