What are you using this PopupWindow for? It sounds like you use it in a more Dialog-ish way.
That being said you'll probably have to look into using setTouchInterceptor and then creating your own OnTouchListener which you will use to check where the touch was performed (on the Popup or not).