GUI.Window: resolving flicker, preventing click-thru, understanding events

I'm using GUILayout.Window to display my game settings. I want the window to size itself according to the content (so if I expand a pulldown, the...