ui: add precondition for dpy_get_ui_info()