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

Skip to content
Commit 52d5f9cc authored by Maryam Dehaini's avatar Maryam Dehaini
Browse files

Use onTouchListener to listen for long press on maximize window button

Currently, an onLongPressListener is being used in order to check if a
user long presses the maximize menu button. The issue with this approach
is that we cannot drag the window from the maximize button. So, if a
window is small or is positioned so that only the right edge of the
caption is visible, it would be very hard for the user to drag the task
without accidentally maximizing or opening the maximize window.

In this approach, we use the onTouchListener instead to check if there
is a long press. This way, we can allow the user to drag the task around
if they begin a drag from the maximize menu button and redirect the
touch to the onClickListener or onTouchListener depending on how long
they are holding the button if the task is not dragged.

Bug: 298267890
Test: Drag a task using maximize menu button

Change-Id: I96eaba90b137f65cf201654433a0d12ed6fe69bb
parent ab6db579
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment