shell: use transient flags for activate or not new surfaces
authorTiago Vignatti <tiago.vignatti@intel.com>
Wed, 23 May 2012 19:06:26 +0000 (22:06 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Sat, 26 May 2012 02:52:03 +0000 (22:52 -0400)
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 <tiago.vignatti@intel.com>
src/shell.c

index 9658976..b37de80 100644 (file)
@@ -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)