anchor.diff:            break;
           case 'restore':
             state = state.copyWith(visible: true, active: true);
  +          _idleTimer?.cancel();
             break;
           default:
             _log.fine('Window event ignored: $eventName');
  
positive.code: 
    void _init() async {
      windowManager.addListener(this);
      _idleTimer = Timer(const Duration(seconds: 5), () async {
        final visible = await windowManager.isVisible();
        if (mounted && !visible) {
          state = state.copyWith(active: false);
        }
      });
    }
  
    @override
  
negative.code:           state = state.copyWith(focused: false);
            _idleTimer?.cancel();
            _idleTimer = Timer(const Duration(seconds: 5), () async {
              if (mounted) {
                state = state.copyWith(active: false);
              }
            });
  