don’t wrap when changing workspaces by mouse wheel scrolling
This commit is contained in:
parent
78721065e0
commit
4f93e0587a
|
@ -302,17 +302,13 @@ void handle_button(xcb_button_press_event_t *event) {
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
/* Mouse wheel down. We select the next ws */
|
/* Mouse wheel down. We select the next ws */
|
||||||
if (cur_ws == TAILQ_FIRST(walk->workspaces)) {
|
if (cur_ws != TAILQ_FIRST(walk->workspaces)) {
|
||||||
cur_ws = TAILQ_LAST(walk->workspaces, ws_head);
|
|
||||||
} else {
|
|
||||||
cur_ws = TAILQ_PREV(cur_ws, ws_head, tailq);
|
cur_ws = TAILQ_PREV(cur_ws, ws_head, tailq);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
/* Mouse wheel up. We select the previos ws */
|
/* Mouse wheel up. We select the previos ws */
|
||||||
if (cur_ws == TAILQ_LAST(walk->workspaces, ws_head)) {
|
if (cur_ws != TAILQ_LAST(walk->workspaces, ws_head)) {
|
||||||
cur_ws = TAILQ_FIRST(walk->workspaces);
|
|
||||||
} else {
|
|
||||||
cur_ws = TAILQ_NEXT(cur_ws, tailq);
|
cur_ws = TAILQ_NEXT(cur_ws, tailq);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue