aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rio
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-29 02:42:20 +0000
committerrsc <devnull@localhost>2004-12-29 02:42:20 +0000
commit3015b83184ca9d1f6e72800cb1b3df72dd63dd62 (patch)
treeae06a295d38dc63f021075dc067cefd207b5783e /src/cmd/rio
parent623979856321b997ebd32386eb2fbb3302aa33ad (diff)
downloadplan9port-3015b83184ca9d1f6e72800cb1b3df72dd63dd62.tar.gz
plan9port-3015b83184ca9d1f6e72800cb1b3df72dd63dd62.tar.bz2
plan9port-3015b83184ca9d1f6e72800cb1b3df72dd63dd62.zip
scroll virtual windows using mouse scroll
Diffstat (limited to 'src/cmd/rio')
-rw-r--r--src/cmd/rio/menu.c17
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);