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

Commit 73309669 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "blast: negative display frames are invalid"

parents a1fb7779 0f3242dc
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -141,6 +141,16 @@ bool BufferStateLayer::setFrame(const Rect& frame) {
    int w = frame.getWidth();
    int h = frame.getHeight();

    if (x < 0) {
        x = 0;
        w = frame.right;
    }

    if (y < 0) {
        y = 0;
        h = frame.bottom;
    }

    Mutex::Autolock lock(mStateMutex);
    if (mState.current.active.transform.tx() == x && mState.current.active.transform.ty() == y &&
        mState.current.active.w == w && mState.current.active.h == h) {