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

Commit 824bc5d2 authored by Vladislav Kaznacheev's avatar Vladislav Kaznacheev
Browse files

Correctly handle click (with no drag) when resizing a window.

Currently if user moves the mouse to the window edge where
the pointer changes to a double arrow and then clicks (without
dragging) the freeform window will resize to fullscreen which is
strange.

Bug: 28318822
Change-Id: Ie47a80953dd91f998aa1c32662b363fe0a08fa90
parent c1348e14
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -189,9 +189,10 @@ class TaskPositioner implements DimLayer.DimLayerUser {
                    final boolean wasResizing = mResizing;
                    synchronized (mService.mWindowMap) {
                        endDragLocked();
                        mTask.getDimBounds(mTmpRect);
                    }
                    try {
                        if (wasResizing) {
                        if (wasResizing && !mTmpRect.equals(mWindowDragBounds)) {
                            // We were using fullscreen surface during resizing. Request
                            // resizeTask() one last time to restore surface to window size.
                            mService.mActivityManager.resizeTask(
@@ -376,6 +377,10 @@ class TaskPositioner implements DimLayer.DimLayerUser {
        }

        mWindowOriginalBounds.set(mTmpRect);

        // Make sure we always have valid drag bounds even if the drag ends before any move events
        // have been handled.
        mWindowDragBounds.set(mTmpRect);
    }

    private void endDragLocked() {