MacGui: properly implement system sleep allow/prevent.