blob: 19b897527e4d86d42b18cac357423ac0a93413e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#include "sxwm.h"
#include "util.h"
static void
run(void)
{
XEvent xev;
for (;;) {
XNextEvent(dpy, &xev);
}
}
void
setup(void)
{
dpy = XOpenDisplay(NULL);
if (dpy == 0)
errx(0, "sxwm: can't open display.");
root = XDefaultRootWindow(dpy);
otherwm();
XSelectInput(dpy, root,
SubstructureRedirectMask | KeyPressMask | KeyReleaseMask
);
}
int
main(int ac, char **av)
{
if (ac > 1) {
if (strcmp(av[1], "-v") == 0 || strcmp(av[1], "--version") == 0)
errx(0, "%s\n%s\n%s\n", SXWM_VERSION, SXWM_AUTHOR, SXWM_LICINFO);
else
errx(0, "usage:\n[-v || --version]: See the version of sxwm\n");
}
run();
dpy = XOpenDisplay(NULL);
return 0;
}
|