X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fdesktop.c;h=7127c2d6b01bdee63f36e78ff089bde00568f80a;hb=refs%2Ftags%2F11.0.3;hp=8fe6f7d9f159cdaffc6cb59d7e127bf2ed9cfef8;hpb=308078596396326017e18a8ae81cba89770c3f7a;p=src%2Fagl-compositor.git diff --git a/src/desktop.c b/src/desktop.c index 8fe6f7d..7127c2d 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -96,6 +96,7 @@ desktop_surface_added(struct weston_desktop_surface *dsurface, void *userdata) surface->activated_by_default = false; surface->advertised_on_launch = false; surface->checked_pending = false; + wl_list_init(&surface->link); wl_signal_init(&surface->signal_advertise_app); @@ -238,9 +239,7 @@ skip_output_asignment: weston_desktop_surface_get_app_id(dsurface), ivi_layout_get_surface_role_name(surface)); - /* we weren't added to any list if we are still with 'none' as role */ - if (surface->role != IVI_SURFACE_ROLE_NONE) - wl_list_remove(&surface->link); + wl_list_remove(&surface->link); free(surface); } @@ -268,7 +267,8 @@ desktop_committed(struct weston_desktop_surface *dsurface, surface->checked_pending = true; } - if (!surface->advertised_on_launch) + if (!surface->advertised_on_launch && + !wl_list_empty(&surface->ivi->desktop_clients)) wl_signal_emit(&surface->signal_advertise_app, surface); weston_compositor_schedule_repaint(surface->ivi->compositor);