    s->awake = true;
  #endif
  }
  
  static void navigate_to_settings(UIState *s) {
  #ifdef QCOM
    enable_event_processing(true);
    system("am broadcast -a 'ai.comma.plus.SidebarSettingsTouchUpInside'");
  #else
 
</s> remove       system("service call window 18 i32 0");  // disable event processing
 </s> add 
int event_processing_enabled = -1;
static void enable_event_processing(bool yes) {
  if (event_processing_enabled != 1 && yes) {
    system("service call window 18 i32 1");  // enable event processing
    event_processing_enabled = 1;
  } else if (event_processing_enabled != 0 && !yes) {
    system("service call window 18 i32 0");  // disable event processing
    event_processing_enabled = 0;
  }
}

    s->awake = true;
  #endif
  }
  
int event_processing_enabled = -1;
static void enable_event_processing(bool yes) {
  if (event_processing_enabled != 1 && yes) {
    system("service call window 18 i32 1");  // enable event processing
    event_processing_enabled = 1;
  } else if (event_processing_enabled != 0 && !yes) {
    system("service call window 18 i32 0");  // disable event processing
    event_processing_enabled = 0;
  }
}

  static void navigate_to_settings(UIState *s) {
  #ifdef QCOM
    enable_event_processing(true);
    system("am broadcast -a 'ai.comma.plus.SidebarSettingsTouchUpInside'");
  #else
keep keep keep add keep keep keep keep keep
 fix offroad processing events in bg (#1266)

* fix offroad processing events in bg

* first run of ui

* actually, we don't need that at all

Co-authored-by: Comma Device <device@comma.ai> 
selfdrive/ui/ui.cc