clean up shadow code
Merge branch 'feature/shadow' into feature/palette-windows
group "hide-when-not-active" code near the shadow code