def refresh_codes(self, timestamp=None, lock=None, std=None):
        if not self._reader and self.watcher.reader:
            return self._on_reader(self.watcher, self.watcher.reader, lock)
        elif is_minimized(self._app.window):
            self._needs_read = True
            return
        lock = self.grab_lock(lock, True)
        if not lock:
            return
        self._app.worker.post_bg((self._refresh_codes_locked, timestamp, lock,
                                  std))