layout: Make the view mapped at activation completion 75/27375/3
authorMarius Vlad <marius.vlad@collabora.com>
Wed, 13 Apr 2022 12:37:12 +0000 (15:37 +0300)
committerMarius Vlad <marius.vlad@collabora.com>
Fri, 29 Apr 2022 10:51:34 +0000 (10:51 +0000)
Instead of tagging it various places just do it a completion phase.
Makes things a bit easier to follow/read.

Bug-AGL: SPEC-4302
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I91ad6b29a786c4c78afa8ff07d104008be7bcb84

src/layout.c

index a8f0956..c98ae76 100644 (file)
@@ -203,6 +203,7 @@ ivi_layout_activate_complete(struct ivi_output *output,
                                 woutput->y + output->area.y);
 
        view->is_mapped = true;
+       surf->mapped = true;
        view->surface->is_mapped = true;
 
        if (output->active) {
@@ -340,7 +341,6 @@ ivi_layout_desktop_committed(struct ivi_surface *surf)
                                        weston_desktop_surface_get_app_id(surf->dsurface),
                                        ivi_layout_get_surface_role_name(surf));
                                ivi_layout_activate(r_output, app_id);
-                               surf->mapped = true;
                        } else if (!app_id) {
                                /*
                                 * applications not setting an app_id, or
@@ -352,7 +352,6 @@ ivi_layout_desktop_committed(struct ivi_surface *surf)
                                weston_log("Surface no app_id, role %s activating by default\n",
                                        ivi_layout_get_surface_role_name(surf));
                                ivi_layout_activate_by_surf(r_output, surf);
-                               surf->mapped = true;
                        }
                }
 
@@ -377,7 +376,6 @@ ivi_layout_desktop_committed(struct ivi_surface *surf)
                                        weston_desktop_surface_get_app_id(surf->dsurface),
                                        ivi_layout_get_surface_role_name(surf));
                        ivi_layout_activate(output, app_id);
-                       surf->mapped = true;
                }
                return;
        }