js/main: Unset input method on shutdown

After shutdown, the Javascript context will be disposed, so we must make
sure we remain the active input method after this point.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6535
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>
This commit is contained in:
Jonas Ådahl 2023-03-24 11:26:49 +01:00
parent 1da8df81c5
commit 8ab344929d

View File

@ -241,6 +241,8 @@ function _initializeUI() {
inputMethod = new InputMethod.InputMethod();
Clutter.get_default_backend().set_input_method(inputMethod);
global.connect('shutdown',
() => Clutter.get_default_backend().set_input_method(null));
screenshotUI = new Screenshot.ScreenshotUI();