Skip to content
  • Arnaud Vrac's avatar
    clients/desktop-shell: fix crash on init when panel is disabled · eadffb6f
    Arnaud Vrac authored and Marius Vlad's avatar Marius Vlad committed
    
    
    The same output might be inited twice on init when the shell panel is disabled,
    depending on the order the weston_desktop_shell and wl_output globals are
    advertised. This triggers a protocol error as only one background can be created
    per output.
    
    Since initializing the output requires the weston_desktop_shell global (to
    create the background and panel on this output), the output init call is done
    conditionally in two places: in the global registry handler (to handle output
    hotplug) and after the initial wl_display_roundtrip call to handle the case
    where the weston_desktop_shell global was notified after the outputs.
    
    We now check the output has already been initialized correctly by checking if
    the background has been created, instead of the panel which is not always
    created.
    
    Signed-off-by: default avatarArnaud Vrac <avrac@freebox.fr>
    (cherry picked from commit 59207a7c)
    eadffb6f
Loading