summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajendraprasad K J <KarammelJayakumar.Rajendraprasad@in.bosch.com>2020-01-08 22:44:20 -0500
committerRajendraprasad K J <KarammelJayakumar.Rajendraprasad@in.bosch.com>2020-01-08 22:44:20 -0500
commit3462dd0a79b99200da658e7d21b9eff4384d29ae (patch)
tree379d08cf08659a6d1ca4051e0bdf91c299a402a9
parent0cc3904b8f27775cb1d0900c6355e0f5dbd06ec1 (diff)
downloadwayland-ivi-extension-3462dd0a79b99200da658e7d21b9eff4384d29ae.tar.gz
ivi-controller: add cursor enable option
By default the cursor wont be created, If the user wants then the "enable-cursor" option can be added as true in the ivi-shell section of weston config file, as shown below: [ivi-shell] ... enable-cursor=true Set 'IVI_CLIENT_ENABLE_CURSOR' environment variable if user has added "enable-cursor" option in weston config file. Signed-off-by: Karthiraman Ramaiah <external.kramaiah@de.adit-jv.com> Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com> Signed-off-by: Rajendraprasad K J <KarammelJayakumar.Rajendraprasad@in.bosch.com>
-rw-r--r--weston-ivi-shell/src/ivi-controller.c9
-rw-r--r--weston-ivi-shell/src/ivi-controller.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c
index 5a5e17c..87ebd2e 100644
--- a/weston-ivi-shell/src/ivi-controller.c
+++ b/weston-ivi-shell/src/ivi-controller.c
@@ -43,6 +43,7 @@
#define IVI_CLIENT_SURFACE_ID_ENV_NAME "IVI_CLIENT_SURFACE_ID"
#define IVI_CLIENT_DEBUG_SCOPES_ENV_NAME "IVI_CLIENT_DEBUG_STREAM_NAMES"
+#define IVI_CLIENT_ENABLE_CURSOR_ENV_NAME "IVI_CLIENT_ENABLE_CURSOR"
struct ivilayer;
struct iviscreen;
@@ -1985,6 +1986,10 @@ get_config(struct weston_compositor *compositor, struct ivishell *shell)
"bkgnd-color",
&shell->bkgnd_color, 0xFF000000);
+ weston_config_section_get_bool(section,
+ "enable-cursor",
+ &shell->enable_cursor, 0);
+
wl_array_init(&shell->screen_ids);
while (weston_config_next_section(config, &section, &name)) {
@@ -2172,6 +2177,10 @@ launch_client_process(void *data)
setenv(IVI_CLIENT_DEBUG_SCOPES_ENV_NAME, shell->debug_scopes, 0x1);
free(shell->debug_scopes);
}
+ if(shell->enable_cursor) {
+ sprintf(option, "%d", shell->enable_cursor);
+ setenv(IVI_CLIENT_ENABLE_CURSOR_ENV_NAME, option, 0x1);
+ }
shell->client = weston_client_start(shell->compositor,
shell->ivi_client_name);
diff --git a/weston-ivi-shell/src/ivi-controller.h b/weston-ivi-shell/src/ivi-controller.h
index c279146..aeaba03 100644
--- a/weston-ivi-shell/src/ivi-controller.h
+++ b/weston-ivi-shell/src/ivi-controller.h
@@ -85,6 +85,7 @@ struct ivishell {
int32_t bkgnd_surface_id;
uint32_t bkgnd_color;
+ uint8_t enable_cursor;
struct ivisurface *bkgnd_surface;
struct weston_layer bkgnd_layer;
struct weston_view *bkgnd_view;