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

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

Do not mutate mDragStartTaskBounds during drag-resize

mDragStartTaskBounds is used to compare the bounds at the start of the
drag-resize to the final bounds at the end of the drag-resize. If the
bounds didn't change, then the input sink region needs to updated from
the display-sized region to the default corner/edge region. This is
because usually drag-resizes that did change the size get that update
for free on setGeometry calls, but setGeometry will return early if the
task size didn't change.
This CL fixes a bug where the region wasn't updated correctly after a
drag-resize with no actual size change, which left the sink region
fullscreen after the gesture ended stealing input from everywhere on the
screen. This happened because mDragStartTaskBounds was mutated soon
after being set. Instead, copy the bounds to a tmp Rect during the
display-sized region calculation.

Bug: 322133191
Test: tap a corner of a freeform window to trigger the resize listener,
but don't actually drag it so that the final bounds are unchanged. Then
verify the sink surface was resized back to the edges/corners and it
isn't stealing input from other tasks on screen.

Change-Id: I4200d2956a06e0dceb06b249ba85237cdb86223f
parent 1eed465d
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