I had a hard time understanding the logic... A comment about `XQueryTree` and `XRestackWindows` taking the window order in reverse direction would already help... And another one about where we want the window to appear (last position in `neworder`)