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