From 4804a301db937d10349e79521a0871cb97174a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 5 Dec 2013 22:43:03 -0800 Subject: [PATCH] shell: Put xwayland surface at the top of the fullscreen layer An xwayland surface corresponds to a override-redirect window under X, which is typically a menu or a popup window. They typically appear with a keyboard and mouse grab and by nature of being override-redirect these window can appear anywhere on screen and in the stack. We need to resort to heuristics to decide where to place the override-redirect in our surface stack, and for now we'll just put it on top of everything. That's going to be correct for almost all cases of clicking to open a menu, but we can revisit and refine if we run into a case that needs better handling. --- desktop-shell/shell.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 558a313d..9b8253d5 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2011,6 +2011,8 @@ shell_surface_calculate_layer_link (struct shell_surface *shsurf) } case SHELL_SURFACE_XWAYLAND: + return &shsurf->shell->fullscreen_layer.view_list; + case SHELL_SURFACE_NONE: default: /* Go to the fallback, below. */