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

Commit ba4a9ae5 authored by Ats Jenk's avatar Ats Jenk
Browse files

Remove shadow from fullscreen tasks

Fullscreen tasks do not need to have shadow set.
It is not visible and also affects negatively apps that request to show
wallpaper.

Bug: 303871142
Test: atest WindowDecorationTests
Change-Id: I33cacf2d370b1caf92a9ef6475e27a29f8d869c9
parent 026f2362
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -297,7 +297,7 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
        }

        // Task surface itself
        float shadowRadius = loadDimension(resources, params.mShadowRadiusId);
        float shadowRadius;
        final Point taskPosition = mTaskInfo.positionInParent;
        if (isFullscreen) {
            // Setting the task crop to the width/height stops input events from being sent to
@@ -308,9 +308,12 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
            // drag-resized by the window decoration.
            startT.setWindowCrop(mTaskSurface, null);
            finishT.setWindowCrop(mTaskSurface, null);
            // Shadow is not needed for fullscreen tasks
            shadowRadius = 0;
        } else {
            startT.setWindowCrop(mTaskSurface, outResult.mWidth, outResult.mHeight);
            finishT.setWindowCrop(mTaskSurface, outResult.mWidth, outResult.mHeight);
            shadowRadius = loadDimension(resources, params.mShadowRadiusId);
        }
        startT.setShadowRadius(mTaskSurface, shadowRadius)
                .show(mTaskSurface);