paint shadows according to opacity, remove commented code
This commit is contained in:
parent
adadcb92ac
commit
fd4e9bff7b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue