Make it possible so that clicking in a window does not raise it, as an optional mode.
Don't make that mode disable the program's ability to raise itself.
When in that mode, make dragging the window title move the window and not raise it, and make a click raise it.
It is unbelievable that usability features we had 25 years ago are not being implemented today because so many people are used to the restrictions of Windows.
We need working non-raise window management as this is probably the biggest advantage that Unix has over Windows in the GUI area. Yet everybody is ignoring it, either making it impossible, or giving broken implementations such as Metacity's.