aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rio/main.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-28 23:21:40 +0000
committerrsc <devnull@localhost>2004-12-28 23:21:40 +0000
commit3ddda82110bcba5a7c27734e1938363877c41124 (patch)
tree7d84ff02af213d8c5ab98dc42bca73cf13beb33d /src/cmd/rio/main.c
parentdf49b303431ef0b62c4f6fc4d790a1fd2d2f7e77 (diff)
downloadplan9port-3ddda82110bcba5a7c27734e1938363877c41124.tar.gz
plan9port-3ddda82110bcba5a7c27734e1938363877c41124.tar.bz2
plan9port-3ddda82110bcba5a7c27734e1938363877c41124.zip
add virtual desktop patch from andrey
Diffstat (limited to 'src/cmd/rio/main.c')
-rw-r--r--src/cmd/rio/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/cmd/rio/main.c b/src/cmd/rio/main.c
index d2da22b3..0e649054 100644
--- a/src/cmd/rio/main.c
+++ b/src/cmd/rio/main.c
@@ -38,6 +38,7 @@ int debug;
int signalled;
int num_screens;
int solidsweep = 0;
+int numvirtuals = 0;
Atom exit_rio;
Atom restart_rio;
@@ -65,7 +66,7 @@ char *fontlist[] = {
void
usage(void)
{
- fprintf(stderr, "usage: rio [-grey] [-version] [-font fname] [-term prog] [exit|restart]\n");
+ fprintf(stderr, "usage: rio [-grey] [-version] [-font fname] [-term prog] [-virtuals num] [exit|restart]\n");
exit(1);
}
@@ -99,7 +100,13 @@ main(int argc, char *argv[])
}
else if (strcmp(argv[i], "-term") == 0 && i+1<argc)
termprog = argv[++i];
- else if (strcmp(argv[i], "-version") == 0) {
+ else if (strcmp(argv[i], "-virtuals") == 0 && i+1<argc) {
+ numvirtuals = atoi(argv[++i]);
+ if(numvirtuals < 0 || numvirtuals > 12) {
+ fprintf(stderr, "rio: wrong number of virtual displays, defaulting to 4\n");
+ numvirtuals = 4;
+ }
+ } else if (strcmp(argv[i], "-version") == 0) {
fprintf(stderr, "%s", version[0]);
if (PATCHLEVEL > 0)
fprintf(stderr, "; patch level %d", PATCHLEVEL);
@@ -197,6 +204,8 @@ main(int argc, char *argv[])
for (i = 0; i < num_screens; i++)
initscreen(&screens[i], i, background);
+ initb2menu(numvirtuals);
+
/* set selection so that 9term knows we're running */
curtime = CurrentTime;
XSetSelectionOwner(dpy, _rio_running, screens[0].menuwin, timestamp());