[PATCH weston] shell: Add a lock binding
Quentin Glidic
sardemff7+wayland at sardemff7.net
Sun May 12 01:58:04 PDT 2013
From: Quentin Glidic <sardemff7+git at sardemff7.net>
Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---
src/shell.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/shell.c b/src/shell.c
index 5da649d..135eaa5 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -2705,6 +2705,15 @@ zoom_axis_binding(struct weston_seat *seat, uint32_t time, uint32_t axis,
}
static void
+lock_binding(struct weston_seat *seat, uint32_t time, uint32_t key,
+ void *data)
+{
+ struct desktop_shell *shell = data;
+
+ shell_fade(shell, FADE_OUT);
+}
+
+static void
zoom_key_binding(struct weston_seat *seat, uint32_t time, uint32_t key,
void *data)
{
@@ -4235,6 +4244,8 @@ shell_add_bindings(struct weston_compositor *ec, struct desktop_shell *shell)
/* configurable bindings */
mod = shell->binding_modifier;
+ weston_compositor_add_key_binding(ec, KEY_L, mod,
+ lock_binding, shell);
weston_compositor_add_key_binding(ec, KEY_PAGEUP, mod,
zoom_key_binding, NULL);
weston_compositor_add_key_binding(ec, KEY_PAGEDOWN, mod,
--
1.8.2.1
More information about the wayland-devel
mailing list