input-capture: Fix barrier validation without a monitor at (0.0)
For barrier validation, check_barrier() would start from the (presumably) left-most monitor and walk the neighbor monitors to the right.
This is assuming that there is always a monitor at (0.0), which is not necessarily the case. If the first monitor on the left is not aligned at the top, there is no logical monitor at (0.0) causing a NULL pointer derefence.
Instead of starting from the monitor at (0,0), start from the primary logical monitor, as there is necessarily one.
Fixes: 85885c65 - Check barriers don't extend into nonexisting monitors
Closes: #3272 (closed)
Edited by Olivier Fourdan