Take rotation into account when calculating display size
Created by: ghost
Some changes to make sure that the window is drawn correctly on rotated displays with xrandr, as XRRSizes() always returns width and height for normal rotation. Thus the need to swap them for left and right rotation.