def focus_change(self, i3conn, event):
        has_focus_now = (event.container.window_class == self.class_name)
        if self.had_focus ^ has_focus_now:
            # The monitored application changed focus state
            self.had_focus = has_focus_now
            self.stop_cont(has_focus_now)
Delete all or first/last n of turtle's stamps.
dataset/ETHPy150Open acrisci/i3ipc-python/examples/stop-application-on-unfocus.py/FocusMonitor.focus_change--crossover with--dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/site-packages/turtle.py/RawTurtle.clearstamps