Introduce named aliases for mouse buttons.
This increases readability and allows us to cover up the fact that XCB doesn't define constants for left/right scrolling.
This commit is contained in:
@ -531,7 +531,7 @@ void handle_button(xcb_button_press_event_t *event) {
|
||||
return;
|
||||
}
|
||||
switch (event->detail) {
|
||||
case 4:
|
||||
case XCB_BUTTON_SCROLL_UP:
|
||||
/* Mouse wheel up. We select the previous ws, if any.
|
||||
* If there is no more workspace, don’t even send the workspace
|
||||
* command, otherwise (with workspace auto_back_and_forth) we’d end
|
||||
@ -541,7 +541,7 @@ void handle_button(xcb_button_press_event_t *event) {
|
||||
|
||||
cur_ws = TAILQ_PREV(cur_ws, ws_head, tailq);
|
||||
break;
|
||||
case 5:
|
||||
case XCB_BUTTON_SCROLL_DOWN:
|
||||
/* Mouse wheel down. We select the next ws, if any.
|
||||
* If there is no more workspace, don’t even send the workspace
|
||||
* command, otherwise (with workspace auto_back_and_forth) we’d end
|
||||
|
Reference in New Issue
Block a user