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
dev
Kristian Høgsberg 11 years ago
parent c152ee11e3
commit d55db69c94
  1. 33
      desktop-shell/shell.c

@ -1974,39 +1974,14 @@ shell_surface_calculate_layer_link (struct shell_surface *shsurf)
switch (shsurf->type) { switch (shsurf->type) {
case SHELL_SURFACE_POPUP: { 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: { case SHELL_SURFACE_TOPLEVEL: {
if (shsurf->state.fullscreen) { if (shsurf->state.fullscreen) {
return &shsurf->shell->fullscreen_layer.view_list; return &shsurf->shell->fullscreen_layer.view_list;
} else if (shsurf->parent) { } else if (shsurf->parent) {
/* Move the surface to its parent layer so that /* Move the surface to its parent layer so
* surfaces which are transient for fullscreen surfaces * that surfaces which are transient for
* don't get hidden by the fullscreen surfaces. * fullscreen surfaces don't get hidden by the
* However, unlike popups, transient surfaces are * fullscreen surfaces. */
* stacked in front of their parent but not in front of
* other surfaces of the same type. */
struct weston_view *parent; struct weston_view *parent;
/* TODO: Handle a parent with multiple views */ /* TODO: Handle a parent with multiple views */

Loading…
Cancel
Save