patch 8.2.3761: focus change is not passed on to a terminal window

Problem:    Focus change is not passed on to a terminal window.
Solution:   If the current window is a terminal and focus events are enabled
            send a focus event escape sequence to the terminal.
diff --git a/src/ui.c b/src/ui.c
index 524eb82..906d88f 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1145,6 +1145,10 @@
 	last_time = time(NULL);
     }
 
+#ifdef FEAT_TERMINAL
+    term_focus_change(in_focus);
+#endif
+
     /*
      * Fire the focus gained/lost autocommand.
      */