Skip to content
Commit 1516b047 authored by Prabir Pradhan's avatar Prabir Pradhan Committed by Commit Bot
Browse files

exo: Commit ClientControlledShellSurface scale in tablet mode

When the display's device_scale_factor changes in tablet mode, we expect
that the app does not change its position on the screen, event in
split-screen mode.

However, when this happens, the bounds of the app in DP will change,
since the display size in DP changes. We need to ensure that the scale
in ClientControlledShellSurface gets updated before the DP bounds of the
surface changes, so that when the client is notified of the bounds
change, it will be scaled with the new scale factor.

The client's bounds changes in OnDeviceScaleFactorChanged(), which gets
called before the surface's OnDisplayMetricsChanged(). To ensure the
scale is updated before the bounds change, we set the scale in both
methods.

BUG=b:163424969
TEST=Change display scale with client app open in split-screen mode;
observe that the client app remains in the expected position.

Change-Id: I09ffccc9994357fdeba794041c2abf9274ef986b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2391658


Reviewed-by: default avatarMitsuru Oshima (Slow: gardener) <oshima@chromium.org>
Commit-Queue: Prabir Pradhan <prabirmsp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805612}
parent 1646cd51
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