shell: Reset active view to allow further activation 15/29615/6
authorMarius Vlad <marius.vlad@collabora.com>
Tue, 30 Jan 2024 14:10:35 +0000 (16:10 +0200)
committerMarius Vlad <marius.vlad@collabora.com>
Thu, 22 Feb 2024 13:51:33 +0000 (13:51 +0000)
Going back to regular, with a none orientation would allow to re-activate the
window. This wouldn't happen because we haven't been able to reset
the active window

Keeps things sane for the user and would allow navigating back to
those windows. Further patches should improve and avoid this entirely if
the split window is sticky.

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

src/shell.c

index 7f445e6..020c169 100644 (file)
@@ -1947,6 +1947,11 @@ void shell_set_app_split(struct wl_client *client, struct wl_resource *res,
 
                _ivi_set_shell_surface_split(output->previous_active, NULL,
                                             reverse_orientation(orientation), false);
+
+               if (orientation == AGL_SHELL_TILE_ORIENTATION_NONE &&
+                   output->active == surf) {
+                       output->active = output->previous_active;
+               }
        }
 
        _ivi_set_shell_surface_split(surf, NULL, orientation, false);