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

Skip to content
Commit 1eed465d authored by Jorge Gil's avatar Jorge Gil
Browse files

Ensure the visual indicator is released after drag ends

Drag-moves of a freeform window were creating the visual indicator
surface before it was actually needed (e.g. dragging to top/edge) and
the surface was not released after the drag ended if the window stayed
in freeform mode.

This CL makes two changes:
1) Delay the creation of the surface/window from the constructor
   (triggered by the drag start) to when it is actually needed
   (i.e. right before an animation). This allows unnecessary creation of
   the surface/window when it'll never be shown throught the life of the
   drag, such as when dragging from NO_INDICATOR to NO_INDICATOR (a
   freeform drag-move)
2) Add a call to release the indicator when a drag-move ends if the end
   state is freeform. Previously, the indicator was released after the
   windowing mode animation ended, but this doesn't cover the freeform
   drag-move case, since there is no animation there. This is needed
   even if (1) mentions not creating in the first place during
   drag-moves because a freeform drag to the top or a split drag-zone
   will create the surface, and when that is cancelled and dropped back
   in freeform the surface should be released if it exists.

Additionally added a couple of missing early returns in
DesktopTasksController#onDragPositioningEnd, to prevent both a
fullscreen and split move to happen simultaneously if a task is dragged
and release on one of the top corners of the screen.

Also renames the visual indicator debugging name to something more
generic. Given that it's only created once, it doesn't make sense to
name it after the windowing mode if it'll later be used by other
animations between different drag-zone types.

Bug: 322133191
Test: manual - enter desktop through a drag transition, drag-move a task
and verify unfocused apps can be focused. Also winscope to make sure the
surface was removed.

Change-Id: Ib80d5be3602d7661071f4097b4483896a850993c
parent 6561d91e
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