Reordering the eigenvalues of a periodic matrix pair is a computational task that arises from various applications related to discrete-time periodic descriptor systems, such as pole placement or linear-quadratic optimal control. However, it is also implicitly present in recently developed robust control methods for linear time-invariant systems. In this contribution, a direct algorithm for performing this task based on the solution of a periodic generalized Sylvester equation is proposed. The new approach is numerically backward stable and it is demonstrated that the resulting deflating subspaces can be much more accurate than those computed by collapsing methods.