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

Commit 80e83f72 authored by Qijing Yao's avatar Qijing Yao
Browse files

Update DisplayLayout#mGlobalBoundsDp when display config changes

Previously, when `DisplayController#onDisplayConfigurationChanged` was
called, a new `DisplayLayout` was created, but its `globalBoundsDp`
field was not updated to reflect the topology. This field was
initialized with dimensions based on the display size.

The drag indicator rendering logic uses `globalBoundsDp` to determine
whether the dragged window overlaps the display. Since `globalBoundsDp`
was incorrect after a configuration change, the indicator was always
rendered, even if the window was not actually over the display.

This change updates `onDisplayConfigurationChanged` to set the
`globalBoundsDp` of the new `DisplayLayout` using the `DisplayTopology`

Bug: 398842461
Test: Manual test; atest WMShellUnitTests:DisplayControllerTests
Flag: com.android.window.flags.enable_connected_displays_window_drag
Change-Id: I2a8eb66e2615a87e62d87bafeb9821275aa41638
parent dd8f4e6b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment