1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-17 16:13:34 +01:00

changed indentation to use spaces only

This commit is contained in:
dan
2004-10-12 21:28:27 +00:00
parent 5912898b06
commit 6830b05716
240 changed files with 35951 additions and 35773 deletions

View File

@@ -22,8 +22,8 @@ int main(int argc, char **argv)
dpy = XOpenDisplay("");
if (!dpy) {
puts("cant open display");
exit(1);
puts("cant open display");
exit(1);
}
attr.flags = RC_RenderMode | RC_ColorsPerChannel;
@@ -31,39 +31,40 @@ int main(int argc, char **argv)
attr.colors_per_channel = 4;
ctx = RCreateContext(dpy, DefaultScreen(dpy), &attr);
if (argc<2)
img = RGetImageFromXPMData(ctx, image_name);
if (argc<2)
img = RGetImageFromXPMData(ctx, image_name);
else
img = RLoadImage(ctx, argv[1], 0);
img = RLoadImage(ctx, argv[1], 0);
if (!img) {
puts(RMessageForError(RErrorCode));
exit(1);
puts(RMessageForError(RErrorCode));
exit(1);
}
win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 10, 10,
MAX(img->width, img->height),
MAX(img->height, img->width), 0, 0, 0);
win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 10, 10,
MAX(img->width, img->height),
MAX(img->height, img->width), 0, 0, 0);
XMapRaised(dpy, win);
XFlush(dpy);
a = 0;
while (1) {
RImage *tmp;
a = a + 1.0;
tmp = RRotateImage(img, a);
if (!RConvertImage(ctx, tmp, &pix)) {
puts(RMessageForError(RErrorCode));
exit(1);
}
RReleaseImage(tmp);
XSetWindowBackgroundPixmap(dpy, win, pix);
XFreePixmap(dpy, pix);
XClearWindow(dpy, win);
XSync(dpy, 0);
usleep(50000);
RImage *tmp;
a = a + 1.0;
tmp = RRotateImage(img, a);
if (!RConvertImage(ctx, tmp, &pix)) {
puts(RMessageForError(RErrorCode));
exit(1);
}
RReleaseImage(tmp);
XSetWindowBackgroundPixmap(dpy, win, pix);
XFreePixmap(dpy, pix);
XClearWindow(dpy, win);
XSync(dpy, 0);
usleep(50000);
}
exit(0);
}