aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rio
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-30 18:07:18 +0000
committerrsc <devnull@localhost>2004-12-30 18:07:18 +0000
commit08166a45489b3246406ed72071eda245b5b96b0a (patch)
tree98bd8dd46ec18c6381a2b2119fd041f78d59468e /src/cmd/rio
parent8d8865f3d04d53ecb9f65bdd231dfc365e9dc743 (diff)
downloadplan9port-08166a45489b3246406ed72071eda245b5b96b0a.tar.gz
plan9port-08166a45489b3246406ed72071eda245b5b96b0a.tar.bz2
plan9port-08166a45489b3246406ed72071eda245b5b96b0a.zip
updates from andrey
Diffstat (limited to 'src/cmd/rio')
-rw-r--r--src/cmd/rio/menu.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/cmd/rio/menu.c b/src/cmd/rio/menu.c
index 048a2cc4..37d50161 100644
--- a/src/cmd/rio/menu.c
+++ b/src/cmd/rio/menu.c
@@ -121,17 +121,17 @@ button(XButtonEvent *e)
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(!c && e->type == ButtonPress)
if(numvirtuals > 1 && virt > 0)
switch_to(virt - 1);
return;
+ case Button5:
+ /* scroll down changes to next virtual screen */
+ if(!c && e->type == ButtonPress)
+ if(numvirtuals > 1 && virt < numvirtuals - 1)
+ switch_to(virt + 1);
+ return;
default:
return;
}
@@ -193,7 +193,7 @@ spawn(ScreenInfo *s)
fprintf(stderr, "rio: exec %s", shell);
perror(" failed");
}
- execlp("9term", "9term", "-w", 0);
+ execlp("9term", "9term", scrolling ? "-ws" : "-w", 0);
execlp("xterm", "xterm", "-ut", 0);
perror("rio: exec 9term/xterm failed");
exit(1);
@@ -382,6 +382,12 @@ switch_to(int n)
return;
currents[virt] = current;
virt = n;
+
+ /* redundant when called from a menu switch
+ * but needed for scroll-button switches
+ */
+ b2menu.lasthit = n;
+
switch_to_c(n, clients);
current = currents[virt];
}