Upgrade to thud
[AGL/meta-agl.git] / meta-agl-profile-graphical / recipes-graphics / wayland / weston / 0011-ivi-shell-create-weston-desktop-in_wet_shell_init.patch
1 diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
2 index b0a2a2b9..a889afdb 100644
3 --- a/ivi-shell/ivi-shell.c
4 +++ b/ivi-shell/ivi-shell.c
5 @@ -664,10 +664,14 @@ wet_shell_init(struct weston_compositor *compositor,
6         if (!shell->text_backend)
7                 goto err_shell;
8  
9 +       shell->desktop = weston_desktop_create(compositor, &shell_desktop_api, shell);
10 +       if (!shell->desktop)
11 +               goto err_text_backend;
12 +
13         if (wl_global_create(compositor->wl_display,
14                              &ivi_application_interface, 1,
15                              shell, bind_ivi_application) == NULL)
16 -               goto err_text_backend;
17 +               goto err_desktop;
18  
19         ivi_layout_init_with_compositor(compositor);
20         /* TODO ivi_layout_destroy should be implemented, since multiple lists
21 @@ -676,6 +680,9 @@ wet_shell_init(struct weston_compositor *compositor,
22  
23         return IVI_SUCCEEDED;
24  
25 +err_desktop:
26 +       weston_desktop_destroy(shell->desktop);
27 +
28  err_text_backend:
29         text_backend_destroy(shell->text_backend);
30