diff options
author | Tran Ba Khang(MS/EMC31-XC) <Khang.TranBa@vn.bosch.com> | 2023-01-06 14:27:45 +0700 |
---|---|---|
committer | Tran Ba Khang(MS/EMC31-XC) <Khang.TranBa@vn.bosch.com> | 2023-01-06 14:32:48 +0700 |
commit | 8fbf58778215df0c8286c14e0fe88f59c95f9ae4 (patch) | |
tree | 9443ce4146d2c59a429f107e4598b572eaa280da /ivi-layermanagement-examples/multi-touch-viewer/src/window.c | |
parent | f6911a11dc911a5bcb380d0895db6cfd533a3569 (diff) | |
download | wayland-ivi-extension-8fbf58778215df0c8286c14e0fe88f59c95f9ae4.tar.gz |
multi-touch-viewer: add the type of shell selection input
The wl_shell and ivi_shell can’t create a surface base on a wl_surface at
the same time, so a selection of shell before running the example is required.
The ivi_shell is the shell default,
passing the wl_shell follow by –s option to select wl_shell
Signed-off-by: Tran Ba Khang(MS/EMC31-XC) <Khang.TranBa@vn.bosch.com>
Diffstat (limited to 'ivi-layermanagement-examples/multi-touch-viewer/src/window.c')
-rw-r--r-- | ivi-layermanagement-examples/multi-touch-viewer/src/window.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ivi-layermanagement-examples/multi-touch-viewer/src/window.c b/ivi-layermanagement-examples/multi-touch-viewer/src/window.c index 41b02a9..abd7788 100644 --- a/ivi-layermanagement-examples/multi-touch-viewer/src/window.c +++ b/ivi-layermanagement-examples/multi-touch-viewer/src/window.c @@ -79,12 +79,14 @@ registry_handle_global(void *p_data, struct wl_registry *p_registry, p_display->p_compositor = wl_registry_bind(p_registry, id, &wl_compositor_interface, 1); } - else if (0 == strcmp(p_interface, "wl_shell")) + else if ((0 == strcmp(p_interface, "wl_shell")) && + (p_display->shell_type == WL_SHELL)) { p_display->p_shell = wl_registry_bind(p_registry, id, &wl_shell_interface, 1); } - else if (0 == strcmp(p_interface, "ivi_application")) + else if ((0 == strcmp(p_interface, "ivi_application")) && + (p_display->shell_type == IVI_SHELL)) { p_display->p_ivi_application = wl_registry_bind(p_registry, id, &ivi_application_interface, 1); @@ -500,7 +502,7 @@ DisplayAcquireWindowSurface(struct WaylandDisplay *p_display, } struct WaylandDisplay * -CreateDisplay(int argc, char **argv) +CreateDisplay(int argc, char **argv, enum TypeOfShell shell_type) { struct WaylandDisplay *p_display; @@ -521,6 +523,7 @@ CreateDisplay(int argc, char **argv) return NULL; } + p_display->shell_type = shell_type; p_display->epoll_fd = os_epoll_create_cloexec(); p_display->display_fd = wl_display_get_fd(p_display->p_display); p_display->display_task.run = handle_display_data; |