From 99aeb1e72da85917f5e62b0953d5e60092d5b576 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Wed, 23 May 2012 22:06:26 +0300 Subject: [PATCH] shell: use transient flags for activate or not new surfaces Inactive surfaces doesn't set keyboard focus, so it can be used for tooltips, toolbars and some other type of windows. This requires protocol side changes. Signed-off-by: Tiago Vignatti --- src/shell.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shell.c b/src/shell.c index 96589769..b37de80f 100644 --- a/src/shell.c +++ b/src/shell.c @@ -2133,8 +2133,11 @@ map(struct desktop_shell *shell, struct weston_surface *surface, } switch (surface_type) { - case SHELL_SURFACE_TOPLEVEL: case SHELL_SURFACE_TRANSIENT: + if (shsurf->transient.flags == + WL_SHELL_SURFACE_TRANSIENT_INACTIVE) + break; + case SHELL_SURFACE_TOPLEVEL: case SHELL_SURFACE_FULLSCREEN: case SHELL_SURFACE_MAXIMIZED: if (!shell->locked)