def setModal(self, element=None):
        if element is None: element = self
        self.parent.setModal(element)
Have this element capture all user input.
dataset/ETHPy150Open ardekantur/pyglet/contrib/wydget/wydget/element.py/Element.setModal