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:
committed by
Michael Stapelberg
parent
f28ce227e3
commit
74b69d6d02
@ -182,9 +182,9 @@ static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod
|
||||
if (dest == CLICK_DECORATION || dest == CLICK_INSIDE) {
|
||||
Binding *bind = get_binding_from_xcb_event((xcb_generic_event_t *)event);
|
||||
/* clicks over a window decoration will always trigger the binding and
|
||||
* clicks on the inside of the window will only trigger a binding if it
|
||||
* has modifiers. */
|
||||
if (bind && (dest == CLICK_DECORATION || (bind->mods && dest == CLICK_INSIDE))) {
|
||||
* clicks on the inside of the window will only trigger a binding if
|
||||
* the --whole-window flag was given for the binding. */
|
||||
if (bind && (dest == CLICK_DECORATION || bind->whole_window)) {
|
||||
CommandResult *result = run_binding(bind, con);
|
||||
|
||||
/* ASYNC_POINTER eats the event */
|
||||
|
Reference in New Issue
Block a user