I much prefer what you call "on caption" (I call it the title bar).
I called it as "on caption" because of my habit with Delphi.
It is the title bar really
That's already what we do with the query tool.
So, I'll send the patch in the title bar, for you to give a look.