Based on what I know about windows, something like that in just software will likely be pretty tricky, since most touchscreens effectively emulate a mouse, and clicking around with a mouse will generally shift focus to the window you clicked in.
It might be possible to remember where focus was, and put it back after the click, or put it back after some delay period.
Hmmm....