minor changes
This commit is contained in:
parent
8f4eafaf79
commit
b01cfea5c6
5
Makefile
5
Makefile
|
@ -1,9 +1,10 @@
|
||||||
|
PREFIX ?= /usr
|
||||||
|
MANDIR ?= $(PREFIX)/share/man/man1
|
||||||
|
|
||||||
PACKAGES = x11 xcomposite xfixes xdamage xrender
|
PACKAGES = x11 xcomposite xfixes xdamage xrender
|
||||||
LIBS = `pkg-config --libs $(PACKAGES)` -lm
|
LIBS = `pkg-config --libs $(PACKAGES)` -lm
|
||||||
INCS = `pkg-config --cflags $(PACKAGES)`
|
INCS = `pkg-config --cflags $(PACKAGES)`
|
||||||
CFLAGS = -Wall
|
CFLAGS = -Wall
|
||||||
PREFIX = /usr
|
|
||||||
MANDIR = $(PREFIX)/share/man/man1
|
|
||||||
OBJS = compton.o
|
OBJS = compton.o
|
||||||
|
|
||||||
%.o: src/%.c src/%.h
|
%.o: src/%.c src/%.h
|
||||||
|
|
104
src/compton.c
104
src/compton.c
|
@ -79,7 +79,8 @@ Bool win_type_fade[NUM_WINTYPES];
|
||||||
((w) && ((w)->window_type == WINTYPE_NORMAL \
|
((w) && ((w)->window_type == WINTYPE_NORMAL \
|
||||||
|| (w)->window_type == WINTYPE_UTILITY))
|
|| (w)->window_type == WINTYPE_UTILITY))
|
||||||
|
|
||||||
#define HAS_FRAME_OPACITY(w) (frame_opacity && (w)->top_width)
|
#define HAS_FRAME_OPACITY(w) \
|
||||||
|
(frame_opacity && (w)->top_width)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options
|
* Options
|
||||||
|
@ -401,9 +402,10 @@ sum_gaussian(conv *map, double opacity,
|
||||||
|
|
||||||
/* precompute shadow corners and sides
|
/* precompute shadow corners and sides
|
||||||
to save time for large windows */
|
to save time for large windows */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
presum_gaussian(conv *map) {
|
presum_gaussian(conv *map) {
|
||||||
int center = map->size/2;
|
int center = map->size / 2;
|
||||||
int opacity, x, y;
|
int opacity, x, y;
|
||||||
|
|
||||||
Gsize = map->size;
|
Gsize = map->size;
|
||||||
|
@ -990,7 +992,6 @@ paint_all(Display *dpy, XserverRegion region) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (w = list; w; w = w->next) {
|
for (w = list; w; w = w->next) {
|
||||||
|
|
||||||
#if CAN_DO_USABLE
|
#if CAN_DO_USABLE
|
||||||
if (!w->usable) continue;
|
if (!w->usable) continue;
|
||||||
#endif
|
#endif
|
||||||
|
@ -2214,65 +2215,46 @@ static void
|
||||||
usage() {
|
usage() {
|
||||||
fprintf(stderr, "compton v0.0.1\n");
|
fprintf(stderr, "compton v0.0.1\n");
|
||||||
fprintf(stderr, "usage: compton [options]\n");
|
fprintf(stderr, "usage: compton [options]\n");
|
||||||
|
|
||||||
fprintf(stderr, "Options\n");
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
" -d display\n "
|
"Options\n"
|
||||||
"Which display should be managed.\n");
|
"-d display\n"
|
||||||
fprintf(stderr,
|
" Which display should be managed.\n"
|
||||||
" -r radius\n "
|
"-r radius\n"
|
||||||
"The blur radius for shadows. (default 12)\n");
|
" The blur radius for shadows. (default 12)\n"
|
||||||
fprintf(stderr,
|
"-o opacity\n"
|
||||||
" -o opacity\n "
|
" The translucency for shadows. (default .75)\n"
|
||||||
"The translucency for shadows. (default .75)\n");
|
"-l left-offset\n"
|
||||||
fprintf(stderr,
|
" The left offset for shadows. (default -15)\n"
|
||||||
" -l left-offset\n "
|
"-t top-offset\n"
|
||||||
"The left offset for shadows. (default -15)\n");
|
" The top offset for shadows. (default -15)\n"
|
||||||
fprintf(stderr,
|
"-I fade-in-step\n"
|
||||||
" -t top-offset\n "
|
" Opacity change between steps while fading in. (default 0.028)\n"
|
||||||
"The top offset for shadows. (default -15)\n");
|
"-O fade-out-step\n"
|
||||||
fprintf(stderr,
|
" Opacity change between steps while fading out. (default 0.03)\n"
|
||||||
" -I fade-in-step\n "
|
"-D fade-delta-time\n"
|
||||||
"Opacity change between steps while fading in. (default 0.028)\n");
|
" The time between steps in a fade in milliseconds. (default 10)\n"
|
||||||
fprintf(stderr,
|
"-m opacity\n"
|
||||||
" -O fade-out-step\n "
|
" The opacity for menus. (default 1.0)\n"
|
||||||
"Opacity change between steps while fading out. (default 0.03)\n");
|
"-c\n"
|
||||||
fprintf(stderr,
|
" Enabled client-side shadows on windows.\n"
|
||||||
" -D fade-delta-time\n "
|
"-C\n"
|
||||||
"The time between steps in a fade in milliseconds. (default 10)\n");
|
" Avoid drawing shadows on dock/panel windows.\n"
|
||||||
fprintf(stderr,
|
"-z\n"
|
||||||
" -m opacity\n "
|
" Zero the part of the shadow's mask behind the window (experimental)."
|
||||||
"The opacity for menus. (default 1.0)\n");
|
"-f\n"
|
||||||
fprintf(stderr,
|
" Fade windows in/out when opening/closing.\n"
|
||||||
" -c\n "
|
"-F\n"
|
||||||
"Enabled client-side shadows on windows.\n");
|
" Fade windows during opacity changes.\n"
|
||||||
fprintf(stderr,
|
"-i opacity\n"
|
||||||
" -C\n "
|
" Opacity of inactive windows. (0.1 - 1.0)\n"
|
||||||
"Avoid drawing shadows on dock/panel windows.\n");
|
"-e opacity\n"
|
||||||
fprintf(stderr,
|
" Opacity of window titlebars and borders. (0.1 - 1.0)\n"
|
||||||
" -z\n "
|
"-G\n"
|
||||||
"Zero the part of the shadow's mask behind the window (experimental).");
|
" Don't draw shadows on DND windows\n"
|
||||||
fprintf(stderr,
|
"-b daemonize\n"
|
||||||
" -f\n "
|
" Daemonize process.\n"
|
||||||
"Fade windows in/out when opening/closing.\n");
|
"-S\n"
|
||||||
fprintf(stderr,
|
" Enable synchronous operation (for debugging).\n");
|
||||||
" -F\n "
|
|
||||||
"Fade windows during opacity changes.\n");
|
|
||||||
fprintf(stderr,
|
|
||||||
" -i opacity\n "
|
|
||||||
"Opacity of inactive windows. (0.1 - 1.0)\n");
|
|
||||||
fprintf(stderr,
|
|
||||||
" -e opacity\n "
|
|
||||||
"Opacity of window titlebars and borders. (0.1 - 1.0)\n");
|
|
||||||
fprintf(stderr,
|
|
||||||
" -G\n "
|
|
||||||
"Don't draw shadows on DND windows\n");
|
|
||||||
fprintf(stderr,
|
|
||||||
" -b daemonize\n "
|
|
||||||
"Daemonize process.\n");
|
|
||||||
fprintf(stderr,
|
|
||||||
" -S\n "
|
|
||||||
"Enable synchronous operation (for debugging).\n");
|
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue