summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2014-04-30 14:15:14 +0300
committerKristian Høgsberg <krh@bitplanet.net>2014-04-30 09:09:32 -0700
commitef6a7e46eb28d66ccb6d88fa81a55d1a106d632a (patch)
treed83f933a47d58475302fc3f805cddf9471e70bdc
parent024177cecb5bfad228804656e17ac02ac6fd96bf (diff)
downloadweston-ef6a7e46eb28d66ccb6d88fa81a55d1a106d632a.tar.gz
shell: Don't map surfaces of type SHELL_SURFACE_NONE
When commit 07926d90 factored out the code that chooses in which layer a surface is added to, it changed the behavior for surfaces with no type. Instead of not adding it to any layer, the surface is added to the current workspace. This patch restores the old behavior. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77527
-rw-r--r--desktop-shell/shell.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 7631f1b8..7e4ceed9 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -2127,6 +2127,12 @@ shell_surface_calculate_layer_link (struct shell_surface *shsurf)
struct weston_view *parent;
switch (shsurf->type) {
+ case SHELL_SURFACE_XWAYLAND:
+ return &shsurf->shell->fullscreen_layer.view_list;
+
+ case SHELL_SURFACE_NONE:
+ return NULL;
+
case SHELL_SURFACE_POPUP:
case SHELL_SURFACE_TOPLEVEL:
if (shsurf->state.fullscreen && !shsurf->state.lowered) {
@@ -2142,22 +2148,15 @@ shell_surface_calculate_layer_link (struct shell_surface *shsurf)
if (parent)
return parent->layer_link.prev;
}
- break;
- case SHELL_SURFACE_XWAYLAND:
- return &shsurf->shell->fullscreen_layer.view_list;
-
- case SHELL_SURFACE_NONE:
- default:
- /* Go to the fallback, below. */
- break;
+ /* Move the surface to a normal workspace layer so that surfaces
+ * which were previously fullscreen or transient are no longer
+ * rendered on top. */
+ ws = get_current_workspace(shsurf->shell);
+ return &ws->layer.view_list;
}
- /* Move the surface to a normal workspace layer so that surfaces
- * which were previously fullscreen or transient are no longer
- * rendered on top. */
- ws = get_current_workspace(shsurf->shell);
- return &ws->layer.view_list;
+ assert(0 && "Unknown shell surface type");
}
static void
@@ -2198,6 +2197,8 @@ shell_surface_update_layer(struct shell_surface *shsurf)
new_layer_link = shell_surface_calculate_layer_link(shsurf);
+ if (new_layer_link == NULL)
+ return;
if (new_layer_link == &shsurf->view->layer_link)
return;