imcontext: Connect notify::is-active signal for gtk_im_context_focus_in

GtkIMcontext needs to be called gtk_im_context_focus_in|out when
the focus is switched with Alt-Tab key. Now only the toplevel window
can receive the focus change events between windows and GtkTextview
and GtkEntry connect to notify::is-active signal.

Fixes: #2390
9 jobs for gtk-4-im-wayland-is-active in 40 minutes and 8 seconds (queued for 1 second)
Status Job ID Name Coverage
  .Pre
failed #789237
allowed to fail
style-check-diff

00:05:00

 
  Build
failed #789238
fedora-x86_64

00:33:53

passed #789240
win32-ps
msys2-mingw64

00:15:40

failed #789239
release-build

00:35:07

 
  Analysis
skipped #789241
allowed to fail
static-scan
 
  Docs
skipped #789242
reference
 
  Flatpak
skipped #789243
flatpak allowed to fail manual
flatpak-manual:demo
skipped #789245
flatpak allowed to fail manual
flatpak-manual:icon-browser
skipped #789244
flatpak allowed to fail manual
flatpak-manual:widget-factory
 
Name Stage Failure
failed
release-build Build
/builds/fujiwarat/gtk/_build/testsuite/gsk/compare/*/*/*.png: found 99 matching files 
WARNING: /builds/fujiwarat/gtk/_build/testsuite/css/output/*/*.syscap: no matching files
Uploading artifacts to coordinator... ok
id=789239 responseStatus=201 Created token=VShXJJkj
Uploading artifacts...
/builds/fujiwarat/gtk/_build/report-x11.xml: found 1 matching files

WARNING: /builds/fujiwarat/gtk/_build/report-wayland.xml: no matching files
WARNING: /builds/fujiwarat/gtk/_build/report-broadway.xml: no matching files
Uploading artifacts to coordinator... ok
id=789239 responseStatus=201 Created token=VShXJJkj
ERROR: Job failed: exit code 1
failed
fedora-x86_64 Build
/builds/fujiwarat/gtk/_build/testsuite/gsk/compare/*/*/*.png: found 99 matching files 
WARNING: /builds/fujiwarat/gtk/_build/testsuite/css/output/*/*.syscap: no matching files
Uploading artifacts to coordinator... ok
id=789238 responseStatus=201 Created token=VuAdvrb4
Uploading artifacts...
/builds/fujiwarat/gtk/_build/report-x11.xml: found 1 matching files

WARNING: /builds/fujiwarat/gtk/_build/report-wayland.xml: no matching files
WARNING: /builds/fujiwarat/gtk/_build/report-broadway.xml: no matching files
Uploading artifacts to coordinator... ok
id=789238 responseStatus=201 Created token=VuAdvrb4
ERROR: Job failed: exit code 1
failed
style-check-diff .Pre
   gboolean is_active = FALSE;
- GtkTextView *text_view = (GtkTextView *)widget;
+ GtkTextView *text_view = (GtkTextView *) widget;
GtkTextViewPrivate *priv = text_view->priv;

if (gtk_window_get_focus (GTK_WINDOW (window)) != widget)
Running after_script
Uploading artifacts for failed job
ERROR: Job failed: exit code 1