flatpak: Prevent X11 access in a Wayland session with newer Flatpak
On newer Flatpak versions, this will grant access to the X11 socket only when running in an X11 session, and not in a Wayland session with an XWayland server present.
Older Flatpak versions will continue to behave as before.