shell: Move maximize and fullscreen bindings to mod + SHIFT
authorKristian Høgsberg <krh@bitplanet.net>
Sat, 11 Jan 2014 21:10:21 +0000 (13:10 -0800)
committerKristian Høgsberg <krh@bitplanet.net>
Sat, 11 Jan 2014 21:58:33 +0000 (13:58 -0800)
mod + f and mod + m conflict with too many application bindings, in
particular if mod is mapped to ALT.

clients/window.c
desktop-shell/shell.c

index d59b9c7..dddfc67 100644 (file)
@@ -2934,6 +2934,7 @@ keyboard_handle_key(void *data, struct wl_keyboard *keyboard,
        if (num_syms == 1)
                sym = syms[0];
 
+
        if (sym == XKB_KEY_F5 && input->modifiers == MOD_ALT_MASK) {
                if (state == WL_KEYBOARD_KEY_STATE_PRESSED)
                        window_set_maximized(window,
index a8c4b3e..ad0a055 100644 (file)
@@ -5477,10 +5477,10 @@ shell_add_bindings(struct weston_compositor *ec, struct desktop_shell *shell)
                                          zoom_key_binding, NULL);
        weston_compositor_add_key_binding(ec, KEY_PAGEDOWN, mod,
                                          zoom_key_binding, NULL);
-       weston_compositor_add_key_binding(ec, KEY_M, mod, maximize_binding,
-                                         NULL);
-       weston_compositor_add_key_binding(ec, KEY_F, mod, fullscreen_binding,
-                                         NULL);
+       weston_compositor_add_key_binding(ec, KEY_M, mod | MODIFIER_SHIFT,
+                                         maximize_binding, NULL);
+       weston_compositor_add_key_binding(ec, KEY_F, mod | MODIFIER_SHIFT,
+                                         fullscreen_binding, NULL);
        weston_compositor_add_button_binding(ec, BTN_LEFT, mod, move_binding,
                                             shell);
        weston_compositor_add_touch_binding(ec, mod, touch_move_binding, shell);