diff options
author | Tran Ba Khang(MS/EMC31-XC) <Khang.TranBa@vn.bosch.com> | 2023-03-20 18:00:41 +0700 |
---|---|---|
committer | Tran Ba Khang(MS/EMC31-XC) <Khang.TranBa@vn.bosch.com> | 2023-04-28 15:12:06 +0700 |
commit | 765e844c296f5db8ecd0b29e539698c82dceaf22 (patch) | |
tree | 6908519b5598a311570be4efce44893900861d01 /ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c | |
parent | 8a735a3ee6695778c9907f6bd044e9be7db1ef37 (diff) | |
download | wayland-ivi-extension-765e844c296f5db8ecd0b29e539698c82dceaf22.tar.gz |
ilmInput: support ilm_getDefaultSeat api to return default seat name
Sometimes the client need to know the default seat is
available or not, or it wants to know which seat is default among
multi seats.
The seat_create_event should add more an argument for identification
of default seat. The ilm_getDefaultSeat is going to query the list
of seats to find the default seat name.
Signed-off-by: Tran Ba Khang(MS/EMC31-XC) <Khang.TranBa@vn.bosch.com>
Diffstat (limited to 'ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c')
-rw-r--r-- | ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c index b4fdfbf..533c053 100644 --- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c +++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c @@ -754,7 +754,8 @@ static void input_listener_seat_created(void *data, struct ivi_input *ivi_input, const char *name, - uint32_t capabilities) + uint32_t capabilities, + int32_t is_default) { struct wayland_context *ctx = data; struct seat_context *seat; @@ -771,6 +772,7 @@ input_listener_seat_created(void *data, } seat->seat_name = strdup(name); seat->capabilities = capabilities; + seat->is_default = (is_default == ILM_TRUE) ? true : false; wl_list_insert(&ctx->list_seat, &seat->link); } @@ -900,7 +902,6 @@ registry_handle_control(void *data, { struct wayland_context *ctx = data; (void)version; - if (strcmp(interface, "ivi_wm") == 0) { ctx->controller = wl_registry_bind(registry, name, &ivi_wm_interface, 1); @@ -913,7 +914,7 @@ registry_handle_control(void *data, } else if (strcmp(interface, "ivi_input") == 0) { ctx->input_controller = - wl_registry_bind(registry, name, &ivi_input_interface, 1); + wl_registry_bind(registry, name, &ivi_input_interface, 2); if (ctx->input_controller == NULL) { fprintf(stderr, "Failed to registry bind input controller\n"); |