desktop: Remove the active surface only if matches the one being displayed 26/24326/3
authorMarius Vlad <marius.vlad@collabora.com>
Sat, 4 Apr 2020 15:25:09 +0000 (18:25 +0300)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Fri, 10 Apr 2020 15:32:56 +0000 (15:32 +0000)
We incorrectly removed the active surface being displayed even if it
wasn't the one currently displayed, so this patch only removes the
active surface if the surface being removed is the same as the one being
displayed.

Bug-AGL: SPEC-3318

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

src/desktop.c

index 7c6c19a..da28fc6 100644 (file)
@@ -117,7 +117,7 @@ desktop_surface_removed(struct weston_desktop_surface *dsurface, void *userdata)
                return;
 
        /* reset the active surface as well */
-       if (output && output->active) {
+       if (output && output->active && output->active == surface) {
                output->active->view->is_mapped = false;
                output->active->view->surface->is_mapped = false;