def on_window_focus(self, i3conn, event):
        with self.window_list_lock:
            window_id = event.container.props.id
            if window_id in self.window_list:
                self.window_list.remove(window_id)
            self.window_list.insert(0, window_id)
            if len(self.window_list) > MAX_WIN_HISTORY:
                del self.window_list[MAX_WIN_HISTORY:]
dataset/ETHPy150Open acrisci/i3ipc-python/examples/focus-last.py/FocusWatcher.on_window_focus/original