fix a small compositor issue, refactor window stacking