Allow using left/right scrolling like up/down scrolling.

This commit makes left/right scrolling synonyms for up/down scrolling for
* scrolling on window decoration
* scrolling on i3bar workspaces

fixes #2677
This commit is contained in:
Ingo Bürk
2017-02-12 20:48:44 +01:00
parent 7732971ad8
commit 432c4211ea
3 changed files with 9 additions and 4 deletions

View File

@ -532,6 +532,7 @@ void handle_button(xcb_button_press_event_t *event) {
}
switch (event->detail) {
case XCB_BUTTON_SCROLL_UP:
case XCB_BUTTON_SCROLL_LEFT:
/* Mouse wheel up. We select the previous ws, if any.
* If there is no more workspace, dont even send the workspace
* command, otherwise (with workspace auto_back_and_forth) wed end
@ -542,6 +543,7 @@ void handle_button(xcb_button_press_event_t *event) {
cur_ws = TAILQ_PREV(cur_ws, ws_head, tailq);
break;
case XCB_BUTTON_SCROLL_DOWN:
case XCB_BUTTON_SCROLL_RIGHT:
/* Mouse wheel down. We select the next ws, if any.
* If there is no more workspace, dont even send the workspace
* command, otherwise (with workspace auto_back_and_forth) wed end