diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/rio/menu.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/cmd/rio/menu.c b/src/cmd/rio/menu.c index d313f5e4..048a2cc4 100644 --- a/src/cmd/rio/menu.c +++ b/src/cmd/rio/menu.c @@ -118,10 +118,22 @@ button(XButtonEvent *e) } else if(numvirtuals > 1 && (n = menuhit(e, &b2menu)) > -1) button2(n); return; - default: - return; case Button3: break; + case Button4: + /* scroll down changes to next virtual screen */ + if(!c) + if(numvirtuals > 1 && virt < numvirtuals - 1) + switch_to(virt + 1); + return; + case Button5: + /* scroll up changes to previous virtual screen */ + if(!c) + if(numvirtuals > 1 && virt > 0) + switch_to(virt - 1); + return; + default: + return; } if (current && current->screen == s) @@ -274,6 +286,7 @@ unhide(int n, int map) c->label, (int)c->window); return; } + c->virt = virt; if (map) { XMapWindow(dpy, c->window); |