Feature: implement mouse bindings

A configured mouse binding (for example `bindsym button3 kill`) runs
its command when the mouse button is pressed over parts of a container.

If the binding has no modifer, it will only run when the button is
clicked on the window titlebar.

Otherwise if the binding has a modifier, it will run over the titlebar
or any part of the contained window.

fixes #558
This commit is contained in:
Tony Crisci
2014-06-17 09:34:13 -04:00
committed by Michael Stapelberg
parent 0bc73f526d
commit 0df172fd05
5 changed files with 78 additions and 12 deletions

View File

@ -61,9 +61,10 @@ void switch_mode(const char *new_mode);
void check_for_duplicate_bindings(struct context *context);
/**
* Runs the given binding and handles parse errors. Returns a CommandResult for
* running the binding's command. Caller should render tree if
* needs_tree_render is true. Free with command_result_free().
* Runs the given binding and handles parse errors. If con is passed, it will
* execute the command binding with that container selected by criteria.
* Returns a CommandResult for running the binding's command. Caller should
* render tree if needs_tree_render is true. Free with command_result_free().
*
*/
CommandResult *run_binding(Binding *bind);
CommandResult *run_binding(Binding *bind, Con *con);