From 01751a8cc982a362b09058f546d8856e0eb883b1 Mon Sep 17 00:00:00 2001 From: Imran Zaman Date: Tue, 30 Dec 2014 15:20:13 +0200 Subject: [PATCH] Enable/disable default virtual keyboard Since fullscreen shell does not support virtual keyboard, added configure option to enable/disable default virtual keyboard. This avoids unnecessary trial of launching vkb and hence will improve boot time Change-Id: I67bdd8ee231d101d6e3747a45968758af42ebc5a Bug-Tizen: TC-810 Signed-off-by: Imran Zaman --- configure.ac | 9 +++++++++ packaging/weston.spec | 4 ++++ src/text-backend.c | 7 +++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 8318887..14294a6 100644 --- a/configure.ac +++ b/configure.ac @@ -83,6 +83,15 @@ if test x$enable_xkbcommon = xyes; then COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon >= 0.3.0" fi +AC_ARG_ENABLE([default-vkb], + [AC_HELP_STRING([--enable-default-vkb], + [Enable default virtual keyboard])], + [], + [enable_default_vkb=yes]) +if test "x$enable_default_vkb" = "xyes"; then + AC_DEFINE(HAVE_DEFAULT_VKB, [1], [Enable default virtual keyboard]) +fi + AC_ARG_ENABLE(sys-uid, [ --enable-sys-uid],, enable_sys_uid=no) if test x$enable_sys_uid = xyes; then diff --git a/packaging/weston.spec b/packaging/weston.spec index d1ded96..6631c93 100644 --- a/packaging/weston.spec +++ b/packaging/weston.spec @@ -23,6 +23,10 @@ %define extra_config_options5 --enable-sys-uid --disable-ivi-shell %endif +%if "%{profile}" == "ivi" +%define extra_config_options4 --disable-default-vkb +%endif + Name: weston Version: 1.7.0 Release: 0 diff --git a/src/text-backend.c b/src/text-backend.c index daae03c..0d2c9ea 100644 --- a/src/text-backend.c +++ b/src/text-backend.c @@ -969,15 +969,18 @@ static void text_backend_configuration(struct text_backend *text_backend) { struct weston_config_section *section; - char *client; - int ret; + char *client = NULL; + int ret = -1; section = weston_config_get_section(text_backend->compositor->config, "input-method", NULL, NULL); +#if HAVE_DEFAULT_VKB ret = asprintf(&client, "%s/weston-keyboard", weston_config_get_libexec_dir()); +#endif if (ret < 0) client = NULL; + weston_config_section_get_string(section, "path", &text_backend->input_method.path, client); -- 2.7.4