It’s not directly related to flatpak & is always an issue if the application does not support Wayland natively. Though the actual severity can vary from application to application.
Both x11 & fallback-x11 get added to the applications for compatible reasons:
The fallback-x11 option makes the X11 socket available only if there is no Wayland socket. This option was introduced in 0.11.3. To support older Flatpak releases, specify both x11 and fallback-x11. The fallback-x11 option takes precedence when both are supported.
If the application supports Wayland then --socket=wayland & --socket=fallback-x11 should be enough, but an additional --socket=x11 does not change the behaviour.
I think if an applications omits --socket=fallback-x11 then it could decide to use X11 through XWayland instead of Wayland natively since both sockets are exposed. But this would be explicitly handled by the application, e.g. to work around bugs.
If there is no Wayland support for the application then you’d only set --socket=x11. fallback-x11 should be used in combination with wayland…
…since that ensures compatibility with Wayland (preferred output) & X11.
You’d only not set --socket=fallback-x11 if the application doesn’t X11 at all.
As far as I understand, the new driver explicitly fixes the flickering in XWayland applications, native Wayland should already be fine. But not all applications support Wayland.
Ok. One more case. I’ve started making a flatpak for SWI-Prolog. SWI-Prolog comes with a console with menus that is written in Qt. In addition, it has its own graphics that uses X11 (old stuff, binds directly to Xt/Xlib). If I run the linter from flathub, it complains I enabled both X11 and wayland. What is correct here?
If the user doesn’t use SWI-Prolog’s graphics, it is an Qt application and thus should use wayland and fallback-x11.
If the user does use SWI-Prolog’s graphics, the application will talk to both wayland and X11 (I think), so it should be wayland and x11. This however is not appreciated by the linter. Is this nevertheless correct? This surely works (Fedora 40, Gnome 46 using wayland).