aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rio
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/rio')
-rw-r--r--src/cmd/rio/Imakefile27
-rw-r--r--src/cmd/rio/color.c2
-rw-r--r--src/cmd/rio/main.c13
-rw-r--r--src/cmd/rio/mkfile5
4 files changed, 42 insertions, 5 deletions
diff --git a/src/cmd/rio/Imakefile b/src/cmd/rio/Imakefile
new file mode 100644
index 00000000..43a78931
--- /dev/null
+++ b/src/cmd/rio/Imakefile
@@ -0,0 +1,27 @@
+INCLUDES = -I$(TOP)
+DEPLIBS = $(DEPXLIB)
+LOCAL_LIBRARIES = $(XLIB)
+DEFINES = -DSHAPE # -g3 -DDEBUG -DDEBUG_EV
+SRCS = main.c event.c manage.c menu.c client.c grab.c cursor.c error.c color.c
+OBJS = main.o event.o manage.o menu.o client.o grab.o cursor.o error.o color.o
+HFILES = dat.h fns.h patchlevel.h
+MFILES = README 9wm.man Imakefile Makefile.no-imake
+
+ComplexProgramTarget(rio)
+
+bun:
+ bundle $(MFILES) $(SRCS) $(HFILES) >bun
+
+dist:
+ bundle $(MFILES) main.c event.c manage.c >bun1
+ bundle menu.c client.c grab.c cursor.c error.c $(HFILES) >bun2
+
+trout: 9wm.man
+ troff -man 9wm.man >trout
+
+vu: trout
+ xditview trout
+
+clean::
+ $(RM) bun bun[12] trout core
+
diff --git a/src/cmd/rio/color.c b/src/cmd/rio/color.c
index 8c534660..0e3c8d89 100644
--- a/src/cmd/rio/color.c
+++ b/src/cmd/rio/color.c
@@ -8,7 +8,7 @@
#include "fns.h"
unsigned long
-colorpixel(Display *dpy, int depth, ulong rgb)
+colorpixel(Display *dpy, int depth, unsigned long rgb)
{
int r, g, b;
diff --git a/src/cmd/rio/main.c b/src/cmd/rio/main.c
index 0953f1bd..02929773 100644
--- a/src/cmd/rio/main.c
+++ b/src/cmd/rio/main.c
@@ -9,6 +9,9 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
+#ifdef SHAPE
+#include <X11/extensions/shape.h>
+#endif
#include "dat.h"
#include "fns.h"
#include "patchlevel.h"
@@ -70,12 +73,15 @@ main(int argc, char *argv[])
int i, background, do_exit, do_restart;
char *fname;
int shape_event;
+#ifdef SHAPE
+ int dummy;
+#endif
shape_event = 0;
myargv = argv; /* for restart */
do_exit = do_restart = 0;
- background = 1;
+ background = 0;
font = 0;
fname = 0;
for (i = 1; i < argc; i++)
@@ -289,12 +295,11 @@ initscreen(ScreenInfo *s, int i, int background)
XSync(dpy, False);
if (background) {
-/*
XSetWindowBackgroundPixmap(dpy, s->root, s->root_pixmap);
XClearWindow(dpy, s->root);
-*/
+ } else
system("xsetroot -solid grey30");
- }
+
s->menuwin = XCreateSimpleWindow(dpy, s->root, 0, 0, 1, 1, 2, colorpixel(dpy, s->depth, 0x88CC88), colorpixel(dpy, s->depth, 0xE9FFE9));
s->sweepwin = XCreateSimpleWindow(dpy, s->root, 0, 0, 1, 1, 4, s->red, colorpixel(dpy, s->depth, 0xEEEEEE));
}
diff --git a/src/cmd/rio/mkfile b/src/cmd/rio/mkfile
index 8881190c..b5e8b110 100644
--- a/src/cmd/rio/mkfile
+++ b/src/cmd/rio/mkfile
@@ -1,3 +1,4 @@
+PLAN9=../../..
<$PLAN9/src/mkhdr
OFILES=\
@@ -18,3 +19,7 @@ TARG=rio
LDFLAGS=-L$X11/lib -lXext -lX11
<$PLAN9/src/mkone
+
+CFLAGS=$CFLAGS -DSHAPE -I$X11/include
+
+