virtualdesktops: Distribute desktops more evenly between rows
In some cases, the number of desktops in a row can be uneven (for example: 10 desktops in 3 rows take up a 4-4-2 pattern)
This makes the desktops more evenly distributed between rows by calculating the length of each row separately.