[weston,v3,11/15] ivi-shell: create weston_desktop in wet_shell_init

Submitted by Michael Teyfel on April 10, 2018, 9:06 a.m.

Details

Message ID 1523351164-4614-1-git-send-email-mteyfel@de.adit-jv.com
State Superseded
Headers show
Series "Series without cover letter" ( rev: 1 ) in Wayland

Not browsing as part of any series.

Commit Message

Michael Teyfel April 10, 2018, 9:06 a.m.
Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
---
 ivi-shell/ivi-shell.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
index 160c41c..55283a9 100644
--- a/ivi-shell/ivi-shell.c
+++ b/ivi-shell/ivi-shell.c
@@ -644,16 +644,23 @@  wet_shell_init(struct weston_compositor *compositor,
 	if (!shell->text_backend)
 		goto err_shell;
 
+	shell->desktop = weston_desktop_create(compositor, &shell_desktop_api, shell);
+	if (!shell->desktop)
+		goto err_text_backend;
+
 	if (wl_global_create(compositor->wl_display,
 			     &ivi_application_interface, 1,
 			     shell, bind_ivi_application) == NULL)
-		goto err_text_backend;
+		goto err_desktop;
 
 	ivi_layout_init_with_compositor(compositor);
 	shell_add_bindings(compositor, shell);
 
 	return IVI_SUCCEEDED;
 
+err_desktop:
+	weston_desktop_destroy(shell->desktop);
+
 err_text_backend:
 	text_backend_destroy(shell->text_backend);