for i in `xprop -root|grep "_NET_CLIENT_LIST_STACKING(WINDOW): window id" |tr '#' ','|tr ',' '\
'| grep 0x`;do xwininfo -id $i|grep "Window id" ;done
Using the above I was able to get the windows id. and using
xwininfo
able to find the label or name or title of the window.