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

Commit acdde3d7 authored by Adam Cohen's avatar Adam Cohen
Browse files

Fix issue where Workspace scrolling doesn't work

=> The WorkspaceTouchListener was relying on receiving TOUCH_DOWN in order to
   clear its state. This is not guaranteed; ie. when touches begin above
   children of the workspace (icons or widgets)

=> Any invocation of the Workspace long press menu would trigger this issue
   and it would persist until a touch went directly onto the Workspace in a
   location without any children.

Bug 132298752

Change-Id: Id8617baaa1ce59dc84758a7c82049329323b04cc
parent 72c6e7b7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -99,7 +99,6 @@ public class WorkspaceTouchListener extends GestureDetector.SimpleOnGestureListe
                handleLongPress = mTempRect.contains((int) ev.getX(), (int) ev.getY());
            }

            cancelLongPress();
            if (handleLongPress) {
                mLongPressState = STATE_REQUESTED;
                mTouchDownPoint.set(ev.getX(), ev.getY());
@@ -148,6 +147,10 @@ public class WorkspaceTouchListener extends GestureDetector.SimpleOnGestureListe
            }
        }

        if (action == ACTION_UP || action == ACTION_CANCEL) {
            cancelLongPress();
        }

        return result;
    }