Fix rotated outputs mode detection

This old patch fixes rotated outputs by swapping width and height from the xrandr output.