]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/xcb.c
Introduce named aliases for mouse buttons.
[i3/i3] / i3bar / src / xcb.c
index edef9b7e2dd1edbae31b4376c896f4c2edeedc8f..0b9d6f81d33710aae9df9440cb1ffdd77ed4e241 100644 (file)
@@ -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