Commit 032f83cf authored by David Reveman's avatar David Reveman Committed by Commit Bot

exo: Improve placement of XDG popups.

SetParent was called by mistake for popups. That only makes
sense for top level shell surfaces. This removes the incorrect
SetParent call so that SetContainer works as expected and
switches the container type to 'menu'. Menu container behavior
matches the expected XDG client behavior much better.

The result of this change is that popups are no longer placed
below the shelf.

Bug: 788782
Test: weston-terminal
Change-Id: If2b1fc54f23ffc517c767d9f52511d20a34d6b19
Reviewed-on: https://chromium-review.googlesource.com/792274
Commit-Queue: David Reveman <reveman@chromium.org>
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519555}
parent 3a2e6465
......@@ -909,7 +909,7 @@ bool ShellSurface::CanResize() const {
bool ShellSurface::CanMaximize() const {
// Shell surfaces in system modal container cannot be maximized.
if (container_ == ash::kShellWindowId_SystemModalContainer)
if (container_ != ash::kShellWindowId_DefaultContainer)
return false;
// Non-transient shell surfaces can be maximized.
......
......@@ -1737,9 +1737,8 @@ void xdg_surface_v6_get_popup(wl_client* client,
gfx::Point origin = position;
views::View::ConvertPointToScreen(
parent->GetWidget()->widget_delegate()->GetContentsView(), &origin);
shell_surface->SetParent(parent);
shell_surface->SetOrigin(origin);
shell_surface->SetContainer(ash::kShellWindowId_SystemModalContainer);
shell_surface->SetContainer(ash::kShellWindowId_MenuContainer);
shell_surface->SetBoundsMode(ShellSurface::BoundsMode::FIXED);
shell_surface->SetActivatable(false);
shell_surface->SetCanMinimize(false);
......
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