Qt Wayland client wait for Wayland Compositor

  • I am creating my own wayland compositor and client program.

    In an ideal world, the compositor will be loaded before the client application. I have encountered a situation where this is not true.

    However, I was wondering if there was a way for the client app to wait programmatically for the compositor before running.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Can you describe the situation when it happens ?

  • Yes, I get the following message when I try to run my wayland client.

    Failed to create wl_display (No such file or directory)
    qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    Available platform plugins are: wayland-egl, wayland.

    I know this is a pretty standard message. In my situation I know it is because the wayland compositor hasn't fully initialized yet. If I manually wait a second or two to launch the wayland client everything works fine. However, adding in wasted time is undesired as boot time is critical.

  • Lifetime Qt Champion

    How are you starting the compositor ?

Log in to reply