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`)
* __titlebar/frame transparency__ (specified with `-e`)
* menu transparency (thanks to Dana)
* shadows are now enabled for argb windows, e.g. terminals with transparency
* removed serverside shadows (and simple compositing) to clean the code,
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.
@ -55,7 +55,6 @@ The same dependencies and build as xcompmgr.
* libxdamage
* libxfixes
* libxrender
* autoconf
To build, make sure you have the above dependencies:

View File

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