layout: Use view's mapping once we placed the view in the hidden layer 03/27903/3
authorMarius Vlad <marius.vlad@collabora.com>
Mon, 15 Aug 2022 13:01:52 +0000 (16:01 +0300)
committerMarius Vlad <marius.vlad@collabora.com>
Wed, 14 Sep 2022 16:35:08 +0000 (16:35 +0000)
This avoids re-sending the dimensions until the client acks the new
dimensions. It avoids some innocuous logging.

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

src/layout.c

index 5d24a1f..c2b17ce 100644 (file)
@@ -285,14 +285,6 @@ ivi_layout_add_to_hidden_layer(struct ivi_surface *surf,
        struct ivi_compositor *ivi = surf->ivi;
        const char *app_id = weston_desktop_surface_get_app_id(dsurf);
 
-       weston_desktop_surface_set_maximized(dsurf, true);
-       weston_desktop_surface_set_size(dsurf,
-                                       ivi_output->area.width,
-                                       ivi_output->area.height);
-
-       weston_log("Setting app_id %s, role %s, set to maximized (%dx%d)\n",
-                       app_id, ivi_layout_get_surface_role_name(surf),
-                       ivi_output->area.width, ivi_output->area.height);
        /*
         * If the view isn't mapped, we put it onto the hidden layer so it will
         * start receiving frame events, and will be able to act on our
@@ -302,6 +294,15 @@ ivi_layout_add_to_hidden_layer(struct ivi_surface *surf,
                ev->is_mapped = true;
                ev->surface->is_mapped = true;
 
+               weston_desktop_surface_set_maximized(dsurf, true);
+               weston_desktop_surface_set_size(dsurf,
+                                               ivi_output->area.width,
+                                               ivi_output->area.height);
+
+               weston_log("Setting app_id %s, role %s, set to maximized (%dx%d)\n",
+                               app_id, ivi_layout_get_surface_role_name(surf),
+                               ivi_output->area.width, ivi_output->area.height);
+
                weston_view_set_output(ev, ivi_output->output);
                weston_layer_entry_insert(&ivi->hidden.view_list, &ev->layer_link);
                weston_log("Placed app_id %s, type %s in hidden layer\n",