Yet another try at get_parent. The previous implementation incorrectly returned -1 for many transient windows, which made them transient for the root window rather than the application window at the X11 side. With this implementation, the transient test case in seamlessrdp-channel.txt passes.