def handle_input(self):
        """Quit if 'x' on window is clicked."""
        for event in SERVICES_NS.get_events():
            if event.type == QUIT:
                self.quit()
Quit if 'x' on window is clicked.
nodezator/loopman/main.py