paint shadows according to opacity, remove commented code

This commit is contained in:
Christopher Jeffrey 2011-11-15 23:55:11 -06:00
parent adadcb92ac
commit fd4e9bff7b
1 changed files with 5 additions and 3 deletions

View File

@ -858,7 +858,6 @@ win_extents(Display *dpy, win *w) {
if (w->window_type
&& w->window_type < NUM_WINTYPES
&& win_type_shadow[w->window_type]) {
//if (w->mode != WINDOW_ARGB) {
XRectangle sr;
w->shadow_dx = shadow_offset_x;
@ -867,10 +866,14 @@ win_extents(Display *dpy, win *w) {
if (!w->shadow) {
double opacity = shadow_opacity;
if (w->mode == WINDOW_TRANS) {
if (w->mode != WINDOW_SOLID) {
opacity = opacity * ((double)w->opacity) / ((double)OPAQUE);
}
if (HAS_FRAME_OPACITY(w)) {
opacity = opacity * frame_opacity;
}
w->shadow = shadow_picture(
dpy, opacity, w->alpha_pict,
w->a.width + w->a.border_width * 2,
@ -900,7 +903,6 @@ win_extents(Display *dpy, win *w) {
if (sr.y + sr.height > r.y + r.height) {
r.height = sr.y + sr.height - r.y;
}
//}
}
return XFixesCreateRegion(dpy, &r, 1);