Revamped base dialog implementation to have a more sensible approach
that works correctly with dialog or embedded display