It's probably not impossible to do already. Certainly, in my hacking I have accidentally made compiz apply shadow to the unity panel and launcher already. But it was a little buggy, and the compiz changes you suggest sound like the clean way to do it...
I recommend any new decoration/shadow logic should maintain and use virtual Z (depth) values for each window. Then draw the shadows and windows SEPARATELY in appropriate Z order. That would solve and simplify, potentially, all the overlapping shadow issues and support arbitrary window shapes and opacities.
for each unique z value (descending):
draw all the shadows of windows at depth z
draw all the windows and non-shadow decorations of windows at depth z
end for
So you can see, if two windows are the same depth (like two menus, or like a top-level window and a dock), then the shadow of one will never overdraw the content of the other.
Shouldn't this discussion be continued in a new bug or blueprint?
It's probably not impossible to do already. Certainly, in my hacking I have accidentally made compiz apply shadow to the unity panel and launcher already. But it was a little buggy, and the compiz changes you suggest sound like the clean way to do it...
I recommend any new decoration/shadow logic should maintain and use virtual Z (depth) values for each window. Then draw the shadows and windows SEPARATELY in appropriate Z order. That would solve and simplify, potentially, all the overlapping shadow issues and support arbitrary window shapes and opacities.
for each unique z value (descending):
draw all the shadows of windows at depth z
draw all the windows and non-shadow decorations of windows at depth z
end for
So you can see, if two windows are the same depth (like two menus, or like a top-level window and a dock), then the shadow of one will never overdraw the content of the other.
Shouldn't this discussion be continued in a new bug or blueprint?