Revert "shell: Change stacking order calculation for popup surfaces"

Popup windows are relative to a plain wl_surface, so that custom surfaces
can have popups.  This used for the desktop-shell panel for example.  Also,
popups should be immediately on top of their parent surface, as they
typically represent an extension of an UI element in the parent surface
such as a combo box or menu.

This reverts commit da704d97fa.

Conflicts:
	desktop-shell/shell.c

https://bugs.freedesktop.org/show_bug.cgi?id=72547
This commit is contained in:
Kristian Høgsberg 2014-01-01 12:26:14 -08:00
parent c152ee11e3
commit d55db69c94

View file

@ -1974,39 +1974,14 @@ shell_surface_calculate_layer_link (struct shell_surface *shsurf)
switch (shsurf->type) {
case SHELL_SURFACE_POPUP: {
/* Popups should go at the front of the workspace of their
* parent surface, rather than just in front of the parent. This
* fixes the situation where there are two top-level windows:
* - Above
* - Below
* and a pop-up menu is created for 'Below'. We want:
* - Popup
* - Above
* - Below
* not:
* - Above
* - Popup
* - Below
*/
struct shell_surface *parent_shsurf;
parent_shsurf = get_shell_surface(shsurf->parent);
if (parent_shsurf != NULL)
return shell_surface_calculate_layer_link(parent_shsurf);
break;
}
case SHELL_SURFACE_TOPLEVEL: {
if (shsurf->state.fullscreen) {
return &shsurf->shell->fullscreen_layer.view_list;
} else if (shsurf->parent) {
/* Move the surface to its parent layer so that
* surfaces which are transient for fullscreen surfaces
* don't get hidden by the fullscreen surfaces.
* However, unlike popups, transient surfaces are
* stacked in front of their parent but not in front of
* other surfaces of the same type. */
/* Move the surface to its parent layer so
* that surfaces which are transient for
* fullscreen surfaces don't get hidden by the
* fullscreen surfaces. */
struct weston_view *parent;
/* TODO: Handle a parent with multiple views */