layout: Specify the reason for not activating windows 14/29614/6
authorMarius Vlad <marius.vlad@collabora.com>
Tue, 30 Jan 2024 13:33:01 +0000 (15:33 +0200)
committerMarius Vlad <marius.vlad@collabora.com>
Thu, 22 Feb 2024 13:51:33 +0000 (13:51 +0000)
Rather than guessing why the windows do not activate.
Found some use cases where this would be useful to be explicit.

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

src/layout.c

index b3a7329..63ef9f9 100644 (file)
@@ -1091,14 +1091,18 @@ ivi_layout_activate_by_surf(struct ivi_output *output, struct ivi_surface *surf)
 #endif
 
        /* do not 're'-activate surfaces that are split or active */
-       if (surf == output->active ||
-           ivi_layout_surface_is_split_or_fullscreen(surf) ||
-           surf->role != IVI_SURFACE_ROLE_DESKTOP) {
+       if (surf == output->active) {
                weston_log("Application %s is already active on output %s\n",
                                app_id, output->output->name);
                return;
        }
 
+       if (ivi_layout_surface_is_split_or_fullscreen(surf)) {
+               weston_log("Application %s is fullscreen or split on output %s\n",
+                               app_id, output->output->name);
+               return;
+       }
+
        // destroy any split types to allow correct re-activation
        ivi_layout_reset_split_surfaces(surf->ivi);