From 73694c832b4765a1e16e49d9e1f5219e62f310c0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 28 Jun 2012 14:13:10 -0400 Subject: [PATCH] compositor: Move repaint debug binding to mod-shift-space Alt-space or Super-space are too likely to conflict with application bindings. --- src/compositor.c | 2 ++ src/compositor.h | 1 + src/shell.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compositor.c b/src/compositor.c index 8cf66bb..df39274 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1798,6 +1798,8 @@ notify_modifiers(struct wl_seat *wl_seat, uint32_t serial) seat->modifier_state |= MODIFIER_ALT; if (mods_lookup & (1 << seat->xkb_info.super_mod)) seat->modifier_state |= MODIFIER_SUPER; + if (mods_lookup & (1 << seat->xkb_info.shift_mod)) + seat->modifier_state |= MODIFIER_SHIFT; /* Finally, notify the compositor that LEDs have changed. */ if (xkb_state_led_index_is_active(seat->xkb_state.state, diff --git a/src/compositor.h b/src/compositor.h index a144e5f..0d49dec 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -52,6 +52,7 @@ enum weston_keyboard_modifier { MODIFIER_CTRL = (1 << 0), MODIFIER_ALT = (1 << 1), MODIFIER_SUPER = (1 << 2), + MODIFIER_SHIFT = (1 << 3), }; enum weston_led { diff --git a/src/shell.c b/src/shell.c index 2e1e22a..2222970 100644 --- a/src/shell.c +++ b/src/shell.c @@ -3248,7 +3248,7 @@ shell_add_bindings(struct weston_compositor *ec, struct desktop_shell *shell) ec); weston_compositor_add_key_binding(ec, KEY_BRIGHTNESSUP, 0, backlight_binding, ec); - weston_compositor_add_key_binding(ec, KEY_SPACE, mod, + weston_compositor_add_key_binding(ec, KEY_SPACE, mod | MODIFIER_SHIFT, debug_repaint_binding, shell); weston_compositor_add_key_binding(ec, KEY_K, mod, force_kill_binding, shell); -- 2.7.4