Commit 048c6690 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

[ozone/wayland] Initialize zaura_shell on both shell_v6 and shell_stable

This is a follow up of https://crrev.com/c/2353116
([ozone/wayland] zaura_shell initial support).

BUG=1113900
R=msisov@chromium.org

Change-Id: I547f66e49e8ae4161ed15a7359f91b8b7ea17019
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2381253Reviewed-by: default avatarMaksim Sisov (GMT+3) <msisov@igalia.com>
Commit-Queue: Antonio Gomes (GMT-4) <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#802633}
parent 7b7481cf
......@@ -288,6 +288,9 @@ bool XDGSurfaceWrapperImpl::InitializeStable(bool with_toplevel) {
return false;
}
xdg_toplevel_add_listener(xdg_toplevel_.get(), &xdg_toplevel_listener, this);
InitializeAuraShell();
wayland_window_->root_surface()->Commit();
connection_->ScheduleFlush();
return true;
......@@ -329,16 +332,21 @@ bool XDGSurfaceWrapperImpl::InitializeV6(bool with_toplevel) {
zxdg_toplevel_v6_add_listener(zxdg_toplevel_v6_.get(),
&zxdg_toplevel_v6_listener, this);
InitializeAuraShell();
wayland_window_->root_surface()->Commit();
connection_->ScheduleFlush();
return true;
}
void XDGSurfaceWrapperImpl::InitializeAuraShell() {
if (connection_->aura_shell()) {
DCHECK(!aura_surface_);
aura_surface_.reset(zaura_shell_get_aura_surface(
connection_->aura_shell(), wayland_window_->root_surface()->surface()));
zaura_surface_set_fullscreen_mode(aura_surface_.get(),
ZAURA_SURFACE_FULLSCREEN_MODE_IMMERSIVE);
}
wayland_window_->root_surface()->Commit();
connection_->ScheduleFlush();
return true;
}
} // namespace ui
......@@ -77,6 +77,9 @@ class XDGSurfaceWrapperImpl : public ShellSurfaceWrapper {
// Initializes using XDG Shell V6 protocol.
bool InitializeV6(bool with_toplevel);
// Initializes the aura-shell EXO extension, if available.
void InitializeAuraShell();
// Non-owing WaylandWindow that uses this surface wrapper.
WaylandWindow* const wayland_window_;
WaylandConnection* const connection_;
......
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