compositor: Move repaint debug binding to mod-shift-space
authorKristian Høgsberg <krh@bitplanet.net>
Thu, 28 Jun 2012 18:13:10 +0000 (14:13 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 28 Jun 2012 18:13:10 +0000 (14:13 -0400)
Alt-space or Super-space are too likely to conflict with application
bindings.

src/compositor.c
src/compositor.h
src/shell.c

index 8cf66bb..df39274 100644 (file)
@@ -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,
index a144e5f..0d49dec 100644 (file)
@@ -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 {
index 2e1e22a..2222970 100644 (file)
@@ -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);