Add mouse binding pointer position configuration

Add the `--whole-window` switch for mouse bindings. This switch controls
what part of the container the pointer must be over to trigger a mouse
binding. The default is to only trigger mouse bindings over the
titlebars. With this switch, a mouse binding will be triggered over the
main part of the window as well.

This is a breaking change to the previous behavior, which would trigger
a mouse binding with a modifier over any part of the window.

fixes #1429
This commit is contained in:
Tony Crisci
2015-01-29 20:52:52 -05:00
committed by Michael Stapelberg
parent f28ce227e3
commit 74b69d6d02
9 changed files with 34 additions and 22 deletions

View File

@ -50,9 +50,9 @@ EOT
my $expected = <<'EOT';
cfg_enter_mode(meh)
cfg_mode_binding(bindsym, Mod1,Shift, x, (null), resize grow)
cfg_mode_binding(bindcode, Mod1, 44, (null), resize shrink)
cfg_mode_binding(bindsym, Mod1, x, --release, exec foo)
cfg_mode_binding(bindsym, Mod1,Shift, x, (null), (null), resize grow)
cfg_mode_binding(bindcode, Mod1, 44, (null), (null), resize shrink)
cfg_mode_binding(bindsym, Mod1, x, --release, (null), exec foo)
EOT
is(parser_calls($config),
@ -618,7 +618,7 @@ EOT
$expected = <<'EOT';
cfg_enter_mode(yo)
cfg_mode_binding(bindsym, (null), x, (null), resize shrink left)
cfg_mode_binding(bindsym, (null), x, (null), (null), resize shrink left)
ERROR: CONFIG: Expected one of these tokens: <end>, '#', 'set', 'bindsym', 'bindcode', 'bind', '}'
ERROR: CONFIG: (in file <stdin>)
ERROR: CONFIG: Line 1: mode "yo" {