shell: Display previously pending surface once the ready request was received 28/24428/2
authorMarius Vlad <marius.vlad@collabora.com>
Thu, 23 Apr 2020 12:55:34 +0000 (15:55 +0300)
committerMarius Vlad <marius.vlad@collabora.com>
Mon, 11 May 2020 08:18:32 +0000 (08:18 +0000)
Surfaces are being added to linked list of pending surfaces as long as
the 'ready' request wasn't received, and are being categorized as regular
apps once the 'ready' request is handled. But, in order to display it,
the surface has to be activated. With this patch we force to
display/show the last pending surface that was added before issueing
a 'ready' request.

Obviously, multiple surfaces of this kind will be displayed, but only
the last one will remain displayed on the output, hence the refernce of
just the last pending surface. A particular use-case that will benifit
from this is when for instance the launcher application is started
before homescreen. When homescreen starts it will also activate/display
the launcher surface.

Bug-AGL: SPEC-3341

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iace641c3b65d0c5500fe336e592d2e8ada57d7e9

src/shell.c

index cc7b33b..0f2e644 100644 (file)
@@ -307,7 +307,13 @@ shell_ready(struct wl_client *client, struct wl_resource *shell_res)
 
        wl_list_for_each_safe(surface, tmp, &ivi->pending_surfaces, link) {
                wl_list_remove(&surface->link);
-               ivi_set_desktop_surface(surface);
+
+               if (ivi_check_pending_desktop_surface_popup(surface)) {
+                       ivi_set_desktop_surface_popup(surface);
+               } else {
+                       ivi_set_desktop_surface(surface);
+                       ivi_layout_desktop_committed(surface);
+               }
        }
 }