Commit c203649b authored by Kazuki Takise's avatar Kazuki Takise Committed by Commit Bot

Integrate always on top into commit logic in exo

Along with the changes to move always on top to ARC attributes in
Android, this CL integrates always on top into commit logic in exo.

For PIP, as we want to ensure that always on top is toggled after
window state and bounds changes have been done, we update always
on top in onPostWidgetCommit.

BUG=b:138768141
BUG=b:138741400
TEST=Manually confirmed always on top works properly with ArcCompanionLibDemo
TEST=Manually confirmed YouTube doesn't flicker when entering PIP

Change-Id: I22dbad22985bd6e0249b207509e1b0563486edbb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1732703Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarEliot Courtney <edcourtney@chromium.org>
Commit-Queue: Kazuki Takise <takise@chromium.org>
Auto-Submit: Kazuki Takise <takise@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688670}
parent df0c4aea
......@@ -397,14 +397,7 @@ void ClientControlledShellSurface::SetSystemUiVisibility(bool autohide) {
void ClientControlledShellSurface::SetAlwaysOnTop(bool always_on_top) {
TRACE_EVENT1("exo", "ClientControlledShellSurface::SetAlwaysOnTop",
"always_on_top", always_on_top);
if (!widget_)
CreateShellSurfaceWidget(ui::SHOW_STATE_NORMAL);
widget_->GetNativeWindow()->SetProperty(aura::client::kZOrderingKey,
always_on_top
? ui::ZOrderLevel::kFloatingWindow
: ui::ZOrderLevel::kNormal);
pending_always_on_top_ = always_on_top;
}
void ClientControlledShellSurface::SetImeBlocked(bool ime_blocked) {
......@@ -1039,6 +1032,12 @@ void ClientControlledShellSurface::OnPostWidgetCommit() {
orientation_ = pending_orientation_;
if (expected_orientation_ == orientation_)
orientation_compositor_lock_.reset();
widget_->GetNativeWindow()->SetProperty(aura::client::kZOrderingKey,
pending_always_on_top_
? ui::ZOrderLevel::kFloatingWindow
: ui::ZOrderLevel::kNormal);
}
////////////////////////////////////////////////////////////////////////////////
......
......@@ -302,6 +302,8 @@ class ClientControlledShellSurface : public ShellSurfaceBase,
ash::WindowStateType pending_window_state_ = ash::WindowStateType::kNormal;
bool pending_always_on_top_ = false;
ash::WindowPinType current_pin_;
bool can_maximize_ = true;
......
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