Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20a13047 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Use launcher surface when removing launch target

Otherwise events won't be dispatched properly and window opacity will be
wrong.

Test: manual
Fixes: 191149025
Change-Id: Ice7ea86252282c7dc1cb5925dd1bdb8cade89c08
parent 6788b739
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -180,6 +180,12 @@ public class DepthController implements StateHandler<LauncherState>,
     * Sets the specified app target surface to apply the blur to.
     */
    public void setSurface(SurfaceControl surface) {
        // Set launcher as the SurfaceControl when we don't need an external target anymore.
        if (surface == null) {
            ViewRootImpl viewRootImpl = mLauncher.getDragLayer().getViewRootImpl();
            surface = viewRootImpl != null ? viewRootImpl.getSurfaceControl() : null;
        }

        if (mSurface != surface) {
            mSurface = surface;
            if (surface != null) {