It creates an invalid region if given an empty rect. Fortunately RegionInitBoxes() handles that just fine, so use that instead.
We no longer support such old X servers so start using the current functions.
It seems like many of the X11 operations can end up with no pixels actually changing. So instead of discovering and adding workarounds for each individually we'll just check very region added if it's empty.