From d55db69c949899eb2a878f970ae1e01bb2c832b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 1 Jan 2014 12:26:14 -0800 Subject: [PATCH] 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 da704d97faef87520c5b055e4b5c8d1f6c8fc1be. Conflicts: desktop-shell/shell.c https://bugs.freedesktop.org/show_bug.cgi?id=72547 --- desktop-shell/shell.c | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 7ee462fc..b56f3978 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -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 */