Most parts of this function are only relevant for X clients, in particular
the "fullscreen hack". Therefore split up the function into the AbstractClient
Wayland native clients can't dictate the compositor if fullscreen is possible or not. so we don't need to check if their geometry is restricted. At least the call to AbstractClient::sizeForClientSize in the case of ShellClient in the current version on master would imply this.
As far as I know, it depends on compositor's policies, e.g. if max size was set for a xdg-toplevel, then compositor can disallow the fullscreen state, though this is probably unrelated. I just wanted to make sure you did this on purpose.
Should popups be fullscreen-able?