From the Yuan play 《
东窗事犯》 and later Ming geography 《
西湖游览志馀》: Song-dynasty traitor Qin Hui plotted the murder of general Yue Fei under the east window of his home with his wife. After dying, Qin Hui supposedly sent a message from the underworld:
东窗事发矣 — 'the east window affair has come out.' The idiom has meant 'the plot is exposed' ever since.