[PATCH weston 2/2] move text_backend initialization into the shell plugin

Murray Calavera murray.calavera at gmail.com
Wed Jun 10 14:16:02 PDT 2015


Whether a input method is used should be the responsibility
of the shell because some shells may not want to implement
an input method at all

Signed-off-by: Murray Calavera <murray.calavera at gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
 desktop-shell/shell.c | 3 +++
 ivi-shell/ivi-shell.c | 3 +++
 src/compositor.c      | 2 --
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index fe620cb..acd7e68 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -6676,6 +6676,9 @@ module_init(struct weston_compositor *ec,
 	if (input_panel_setup(shell) < 0)
 		return -1;
 
+	if (text_backend_init(ec) < 0)
+		return -1;
+
 	shell_configuration(shell);
 
 	shell->exposay.state_cur = EXPOSAY_LAYOUT_INACTIVE;
diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
index 4a688cc..8f1c3ca 100644
--- a/ivi-shell/ivi-shell.c
+++ b/ivi-shell/ivi-shell.c
@@ -423,6 +423,9 @@ module_init(struct weston_compositor *compositor,
 	if (input_panel_setup(shell) < 0)
 		goto out_settings;
 
+	if (text_backend_init(compositor) < 0)
+		goto out_settings;
+
 	if (wl_global_create(compositor->wl_display,
 			     &ivi_application_interface, 1,
 			     shell, bind_ivi_application) == NULL)
diff --git a/src/compositor.c b/src/compositor.c
index 8f02b4d..38c0775 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4578,8 +4578,6 @@ weston_compositor_init(struct weston_compositor *ec,
 	weston_config_section_get_int(s, "repeat-delay",
 				      &ec->kb_repeat_delay, 400);
 
-	text_backend_init(ec);
-
 	wl_data_device_manager_init(ec->wl_display);
 
 	wl_display_init_shm(display);
-- 
2.4.2



More information about the wayland-devel mailing list