The way it should work is as follows:
Each window can have up to 10 layered elements, and priority levels 1 to 201 are reserved for the GUI. That lets me have 20 windows open at once, which is more than I should need.
If I have a stack of windows like so:
And I want to bring Window 3 to the top, I would have to re-order everything. So what I do is I send Window 3 to priority 1 and distribute the other 2 over the remaining space (Since they're going to get moved anyway). So I end up with:
Or something close to that. This way, if I then need to bring Window 2 to the top, I can move window 3 down a layer, and bring 2 to the top. Basically, it means changing priority left, which could me quite expensive. Changing priority for a window means changing the priority for all of it's widgets, and that usually means removing and reinserting it into the scene graph. It might not be too expensive, but it's still something I'd rather avoid doing all the time.
However, I might just be lazy and do the obvious thing and change all the priorities every frame, just to get something working. It depends if I can get it working on the way home or not. I got very little done this lunch break due to 3 bands adding me on MySpace, resulting in much spammage. Apparently after 50 comments, MySpace gives you one of those "Please type in the letters in the image above" things every 10 comments. Which slowed me down somewhat. Oh well, what a pity, who cares.