layout: Do not attempt to activate the surface on the remote output 73/24673/1 sandbox/mvlad/remote-surfaces
authorMarius Vlad <marius.vlad@collabora.com>
Fri, 5 Jun 2020 14:23:43 +0000 (17:23 +0300)
committerMarius Vlad <marius.vlad@collabora.com>
Mon, 8 Jun 2020 20:24:15 +0000 (23:24 +0300)
Once the view has been placed on remote output do not attempt to
activate it on other output, as it would make it quite confusing to have
same view on multiple outputs.

Bug-AGL: SPEC-3280

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

src/layout.c

index b749b76..4be3254 100644 (file)
@@ -614,6 +614,16 @@ ivi_layout_activate(struct ivi_output *output, const char *app_id)
            ivi_layout_surface_is_split_or_fullscreen(surf))
                return;
 
+       if (surf->role == IVI_SURFACE_ROLE_REMOTE) {
+               struct ivi_output *remote_output =
+                       ivi_layout_find_app_id(app_id, ivi);
+
+               /* if already active on a remote output do not
+                * attempt to activate it again */
+               if (remote_output && remote_output->active == surf)
+                       return;
+       }
+
 
        dsurf = surf->dsurface;
        view = surf->view;