x11: deal with xrandr display size in millimeters being zero. Xquartz on macOS reports a zero size, which leads to a division by zero here.