[PATCH weston 01/10] shell: use transient flags for activate or not new surfaces
Tiago Vignatti
tiago.vignatti at intel.com
Fri May 18 08:47:08 PDT 2012
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 at intel.com>
---
src/shell.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/shell.c b/src/shell.c
index f11f573..d15ffbb 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -138,6 +138,7 @@ struct shell_surface {
struct {
int32_t x, y;
+ enum wl_shell_surface_transient_method flags;
} transient;
struct {
@@ -836,6 +837,7 @@ shell_surface_set_transient(struct wl_client *client,
shsurf->parent = parent_resource->data;
shsurf->transient.x = x;
shsurf->transient.y = y;
+ shsurf->transient.flags = flags;
shsurf->next_type = SHELL_SURFACE_TRANSIENT;
}
@@ -2088,6 +2090,9 @@ 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_METHOD_INACTIVE)
+ break;
case SHELL_SURFACE_FULLSCREEN:
case SHELL_SURFACE_MAXIMIZED:
if (!shell->locked)
--
1.7.9.5
More information about the wayland-devel
mailing list