added function to know xid/winid