'Find the first Window under this node
Returns self if this is a `Window`, otherwise finds first `Window` by
depth-first search'

def get_first_window(self):

    if isinstance(self, Window):
        return self
    for i in self.children:
        node = i.get_first_window()
        if node:
            return node
