ivi-shell: handle subsurfaces for mouse/touch activation

The surface of the focus_view may be a subsurface. So get the corresponding main
surface first.

Without this get_ivi_shell_surface(), will cast committed_private (which is a
weston_subsurface object) to ivi_shell_surface. Weston crashes shortly
afterwards.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This commit is contained in:
Michael Olbrich 2023-03-13 15:01:28 +01:00 committed by Marius Vlad
parent 638dee44ec
commit 141943eb76
1 changed files with 3 additions and 1 deletions

View File

@ -458,8 +458,10 @@ activate_binding(struct weston_seat *seat,
uint32_t flags)
{
struct ivi_shell_surface *ivisurf, *ivisurf_child;
struct weston_surface *main_surface;
ivisurf = get_ivi_shell_surface(focus_view->surface);
main_surface = weston_surface_get_main_surface(focus_view->surface);
ivisurf = get_ivi_shell_surface(main_surface);
if (ivisurf == NULL)
return;