Merge changes I63990ccf,I76ef8b55 into main

* changes:
  InputDispatcher: Send cancellations from losing focus windows
  InputDispatcher: Only dispatch fallback keys when there's a window