Skip to content

Commit

Permalink
ivi-shell: added implementation of desktop_surface_added Added implem…
Browse files Browse the repository at this point in the history
…entation of desktop_surface_added function from weston_desktop_api

Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com>
  • Loading branch information
mtey committed May 23, 2017
1 parent 20e76ae commit c62c620
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ivi-shell/ivi-shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,31 @@ static void
desktop_surface_added(struct weston_desktop_surface *surface,
void *user_data)
{
struct ivi_shell *shell = (struct ivi_shell *) user_data;
struct ivi_layout_surface *layout_surface;
struct ivi_shell_surface *ivisurf;
struct weston_surface *weston_surf = weston_desktop_surface_get_surface(surface);

// TODO first approach for surface id
uint32_t id_surface = 666;

layout_surface = ivi_layout_surface_create(weston_surf, id_surface);
ivisurf = zalloc(sizeof *ivisurf);
if (ivisurf == NULL) {
return;
}

wl_list_init(&ivisurf->link);
wl_list_insert(&shell->ivi_surface_list, &ivisurf->link);

ivisurf->shell = shell;
ivisurf->id_surface = id_surface;

ivisurf->width = 0;
ivisurf->height = 0;
ivisurf->layout_surface = layout_surface;
ivisurf->weston_desktop_surface = surface;
ivisurf->surface = weston_surf;
}

static void
Expand Down

0 comments on commit c62c620

Please sign in to comment.