diff options
author | Ian Ray <ian.ray@ge.com> | 2017-09-18 15:22:01 +0300 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2017-09-18 16:17:08 +0300 |
commit | 13404c40161c6ca432c5fa24432c991bb7850a7a (patch) | |
tree | 5507c8491c21850df3a5aa5ef4544a3662c1bf39 /desktop-shell | |
parent | ab7c0b6afd76448d5d84e9f81830b3531d7cff4f (diff) |
desktop-shell: disable opacity binding when modifier is none
This patch disables the opacity binding when the modifier is configured
to `none' in weston.ini, and thus supports use cases where one does not
want to have this binding.
Signed-off-by: Ian Ray <ian.ray@ge.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/shell.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 3872686a..1f99efe3 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -4860,9 +4860,6 @@ shell_add_bindings(struct weston_compositor *ec, struct desktop_shell *shell) weston_compositor_add_touch_binding(ec, 0, touch_to_activate_binding, shell); - weston_compositor_add_axis_binding(ec, WL_POINTER_AXIS_VERTICAL_SCROLL, - MODIFIER_SUPER | MODIFIER_ALT, - surface_opacity_binding, NULL); weston_compositor_add_key_binding(ec, KEY_BRIGHTNESSDOWN, 0, backlight_binding, ec); weston_compositor_add_key_binding(ec, KEY_BRIGHTNESSUP, 0, @@ -4877,6 +4874,12 @@ shell_add_bindings(struct weston_compositor *ec, struct desktop_shell *shell) if (!mod) return; + /* This binding is not configurable, but is only enabled if there is a + * valid binding modifier. */ + weston_compositor_add_axis_binding(ec, WL_POINTER_AXIS_VERTICAL_SCROLL, + MODIFIER_SUPER | MODIFIER_ALT, + surface_opacity_binding, NULL); + weston_compositor_add_axis_binding(ec, WL_POINTER_AXIS_VERTICAL_SCROLL, mod, zoom_axis_binding, NULL); |