def gatherWindows(off = 25):
tlc = [0,0]
for win in pm.lsUI(type="window"): # loops thru all windows other than "main"
if pm.window(win, ex =1):
if pm.window(win, q=1,mw=1):
tlc = pm.window(win, q=1,tlc=1)
for x,win in enumerate(pm.lsUI(type="window")):
if not re.match("MayaWindow",str(win)):
pm.window(win, e=1, tlc=[tlc[0] + off, tlc[1] + off]) # tlc = topLeftCorner
off = off + 25
that's a small util I wrote to deal with windows appearing off screen.
you can easily query by using pm.windows(winName, q=1, tlc=1)
that will return in a list or tupple (not sure which) the top edge and the left side positions.