fix gcc warning, have shadows be explicitly enabled

This commit is contained in:
Christopher Jeffrey 2011-11-06 19:29:23 -06:00
parent de8b773387
commit b87efad014
2 changed files with 21 additions and 10 deletions

View File

@ -13,10 +13,10 @@ partially doing this out of a desire to learn Xlib.
* __inactive window transparency__ (specified with `-i`) * __inactive window transparency__ (specified with `-i`)
* __titlebar/frame transparency__ (specified with `-e`) * __titlebar/frame transparency__ (specified with `-e`)
* menu transparency (thanks to Dana)
* shadows are now enabled for argb windows, e.g. terminals with transparency * shadows are now enabled for argb windows, e.g. terminals with transparency
* removed serverside shadows (and simple compositing) to clean the code, * removed serverside shadows (and simple compositing) to clean the code,
the only option that remains is clientside shadows the only option that remains is clientside shadows
* menu transparency (thanks to Dana)
The above features give compton a feature set similar to the xfce compositor. The above features give compton a feature set similar to the xfce compositor.
@ -55,7 +55,6 @@ The same dependencies and build as xcompmgr.
* libxdamage * libxdamage
* libxfixes * libxfixes
* libxrender * libxrender
* autoconf
To build, make sure you have the above dependencies: To build, make sure you have the above dependencies:

View File

@ -987,7 +987,10 @@ find_client_win(Display *dpy, Window win) {
static void static void
get_frame_extents(Display *dpy, Window w, get_frame_extents(Display *dpy, Window w,
int *left, int *right, int *top, int *bottom) { unsigned int *left,
unsigned int *right,
unsigned int *top,
unsigned int *bottom) {
long *extents; long *extents;
Atom type; Atom type;
int format; int format;
@ -1012,10 +1015,14 @@ get_frame_extents(Display *dpy, Window w,
if (result == Success) { if (result == Success) {
if (nitems == 4 && after == 0) { if (nitems == 4 && after == 0) {
extents = (long *)data; extents = (long *)data;
*left = (int) *extents; *left =
*right = (int) *(extents + 1); (unsigned int)extents[0];
*top = (int) *(extents + 2); *right =
*bottom = (int) *(extents + 3); (unsigned int)extents[1];
*top =
(unsigned int)extents[2];
*bottom =
(unsigned int)extents[3];
} }
XFree(data); XFree(data);
} }
@ -2216,7 +2223,7 @@ main(int argc, char **argv) {
for (i = 0; i < NUM_WINTYPES; ++i) { for (i = 0; i < NUM_WINTYPES; ++i) {
win_type_fade[i] = False; win_type_fade[i] = False;
win_type_shadow[i] = True; win_type_shadow[i] = False;
win_type_opacity[i] = 1.0; win_type_opacity[i] = 1.0;
} }
@ -2246,6 +2253,11 @@ main(int argc, char **argv) {
fade_out_step = 0.01; fade_out_step = 0.01;
} }
break; break;
case 'c':
for (i = 0; i < NUM_WINTYPES; ++i) {
win_type_shadow[i] = True;
}
break;
case 'C': case 'C':
no_dock_shadow = True; no_dock_shadow = True;
break; break;
@ -2282,11 +2294,11 @@ main(int argc, char **argv) {
case 'e': case 'e':
frame_opacity = (double)atof(optarg); frame_opacity = (double)atof(optarg);
break; break;
case 'c':
case 'n': case 'n':
case 'a': case 'a':
case 's': case 's':
/* legacy */ fprintf(stderr, "Warning: "
"-n, -a, and -s have been removed.\n");
break; break;
default: default:
usage(argv[0]); usage(argv[0]);