Commit 1cd89861 authored by Kazuki Takise's avatar Kazuki Takise Committed by Commit Bot

Always send BOUNDS_CHANGE_REASON_PIP for PIP windows

Although PIP windows are not supposed to be resized by Chrome,
because of vaious off-by-one issues, some bounds move events for
PIP windows are currently considered to be
BOUNDS_CHANGE_REASON_RESIZE, and Android rejects those events as
the window is already in PIP.

BUG=b:171361297
TEST=Manually confirmed the bounds of PIP matches between Android and Chrome

Change-Id: I62d2909f32143e5369587de2ea8abf5748b82233
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2488263
Commit-Queue: Kazuki Takise <takise@chromium.org>
Auto-Submit: Kazuki Takise <takise@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819802}
parent 543a8cd1
......@@ -1143,11 +1143,10 @@ class WaylandRemoteShell : public ash::TabletModeObserver,
int bounds_change) {
zcr_remote_surface_v1_bounds_change_reason reason =
ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_RESIZE;
if (!resize) {
reason = current_state == WindowStateType::kPip
? ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_MOVE_PIP
: ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_MOVE;
}
if (!resize)
reason = ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_MOVE;
if (current_state == WindowStateType::kPip)
reason = ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_PIP;
if (bounds_change & ash::WindowResizer::kBoundsChange_Resizes) {
reason = ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_DRAG_RESIZE;
} else if (bounds_change & ash::WindowResizer::kBoundsChange_Repositions) {
......
......@@ -734,7 +734,7 @@
summary="the window bounds is moved due to other WM operations"/>
<entry name="resize" value="6"
summary="the window bounds is reiszed due to other WM operations"/>
<entry name="move_pip" value="7" summary="the window bounds is resized for PIP"/>
<entry name="pip" value="7" summary="the window bounds is resized or moved for PIP"/>
</enum>
<event name="bounds_changed" since="10">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment