window: Add proper implementation of DrawRect.